Keep the SkPaint used when creating a layer.
This will allow us to inspect the paint for thing other than
color and xfermode, such as SkColorFilters and SkShaders.
bug: 10650594
Change-Id: I2c3ddd07a3966e1e77af34136307e2b59b2898c1
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index c8a6c2d..bf01cbd 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -182,8 +182,9 @@
}
int DisplayListRenderer::saveLayer(float left, float top, float right, float bottom,
- int alpha, SkXfermode::Mode mode, int flags) {
- addStateOp(new (alloc()) SaveLayerOp(left, top, right, bottom, alpha, mode, flags));
+ const SkPaint* paint, int flags) {
+ paint = refPaint(paint);
+ addStateOp(new (alloc()) SaveLayerOp(left, top, right, bottom, paint, flags));
return StatefulBaseRenderer::save(flags);
}