summaryrefslogtreecommitdiff
path: root/libs/hwui/RecordingCanvas.h
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2018-12-07 14:12:12 -0500
committerDerek Sollenberger <djsollen@google.com>2018-12-20 10:04:46 -0500
commit24fc901e5f54ee00f6df323178a05787ab705814 (patch)
tree73085619ebaac2d7632dca84cfbfac40222e4bed /libs/hwui/RecordingCanvas.h
parente8a25e3dbc1f6b1409ea511e2b5faa31cff3faea (diff)
Improve performance of unclipped save layers.
Instead of allocating a separate renderTarget and switching between them on each draw the new implementation follows the same pattern that the old HWUI renderer used. The area of the layer is now copied to a buffer on the GPU, the area is then cleared, rendered as normal, and finally the texture is redrawn using dst_over blending. This results in no render target switches and is considerably faster on some hardware. Test: CtsGraphicsTestCases, CtsUiRenderingTestCases Bug: 119222339 Change-Id: I716aac1fc31e4c7a171373d37dee82034c01cf18
Diffstat (limited to 'libs/hwui/RecordingCanvas.h')
-rw-r--r--libs/hwui/RecordingCanvas.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/RecordingCanvas.h b/libs/hwui/RecordingCanvas.h
index de8777b4e79a..22b3a63884ee 100644
--- a/libs/hwui/RecordingCanvas.h
+++ b/libs/hwui/RecordingCanvas.h
@@ -75,6 +75,7 @@ private:
void save();
void saveLayer(const SkRect*, const SkPaint*, const SkImageFilter*, const SkImage*,
const SkMatrix*, SkCanvas::SaveLayerFlags);
+ void saveBehind(const SkRect*);
void restore();
void concat(const SkMatrix&);
@@ -146,6 +147,7 @@ public:
void willSave() override;
SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override;
void willRestore() override;
+ bool onDoSaveBehind(const SkRect*) override;
void onFlush() override;