Remove Skia RenderPipeline saveLayer logic for software layers.
Test: CtsUiRenderingTestCases:LayerTests
Bug: 72052698
Change-Id: Ief845c409755e6bc61849a6ab3506ef60161f231
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h
index 55f4d89..0742de9 100644
--- a/libs/hwui/RenderProperties.h
+++ b/libs/hwui/RenderProperties.h
@@ -56,11 +56,10 @@
// Keep in sync with View.java:LAYER_TYPE_*
enum class LayerType {
None = 0,
- // Although we cannot build the software layer directly (must be done at
- // record time), this information is used when applying alpha.
+ // We cannot build the software layer directly (must be done at record time) and all management
+ // of software layers is handled in Java.
Software = 1,
RenderLayer = 2,
- // TODO: LayerTypeSurfaceTexture? Maybe?
};
enum ClippingFlags {
diff --git a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
index 77925fd..6c04d78 100644
--- a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
+++ b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
@@ -226,18 +226,6 @@
canvas->drawRect(bounds, transparentPaint);
}
}
-
- // composing a software layer with alpha
- } else if (properties.effectiveLayerType() == LayerType::Software) {
- SkPaint paint;
- bool needsLayer = layerNeedsPaint(layerProperties, alphaMultiplier, &paint);
- if (needsLayer) {
- canvas->saveLayer(bounds, &paint);
- }
- displayList->draw(canvas);
- if (needsLayer) {
- canvas->restore();
- }
} else {
if (alphaMultiplier < 1.0f) {
// Non-layer draw for a view with getHasOverlappingRendering=false, will apply