summaryrefslogtreecommitdiff
path: root/libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2020-05-05 15:53:29 -0400
committerLeon Scroggins III <scroggo@google.com>2020-05-06 09:38:39 -0400
commit0f53e10c07ddfb0a95a8ef13d4f5ec91606dd5ed (patch)
tree758b9077801de5cd744e9bdd7031245b1757daf9 /libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp
parentc8d49effd583b1c6b052c39e52d71d226c029dd0 (diff)
Switch Java calls to enableZ and disableZ; remove isRecordingFor
Bug: 155422223 Test: make insertInOrderBarrier and insertReorderBarrier are @hide and deprecated. Remove them and update all callers to enableZ and disableZ, which are already public. Update native code to refer to enableZ instead of insertReorderBarrier. In addition, remove @hide Canvas#isRecordingFor. This method was originally used to prevent a single RenderNode from being in two display lists. This is now supported, so there's no reason to avoid it. The one caller used it to determine whether to reorder drawing its child Views (which, as the comment says, makes sense to determine based on whether the Canvas isHardwareAccelerated) and whether to call insertReorderBarrier/insertInOrderBarrier (now enableZ/disableZ). In the latter case, there is no need for a conditional, since enableZ/disableZ only work on a hardware Canvas. Change-Id: Ib216a19d6aeff40b2e23532bacd62d1795c2ab27
Diffstat (limited to 'libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp')
-rw-r--r--libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp b/libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp
index bdc991ba1890..c13e80e8c204 100644
--- a/libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp
+++ b/libs/hwui/tests/common/scenes/ShadowGrid2Animation.cpp
@@ -29,7 +29,7 @@ public:
std::vector<sp<RenderNode> > cards;
void createContent(int width, int height, Canvas& canvas) override {
canvas.drawColor(0xFFFFFFFF, SkBlendMode::kSrcOver);
- canvas.insertReorderBarrier(true);
+ canvas.enableZ(true);
for (int x = dp(8); x < (width - dp(58)); x += dp(58)) {
for (int y = dp(8); y < (height - dp(58)); y += dp(58)) {
@@ -39,7 +39,7 @@ public:
}
}
- canvas.insertReorderBarrier(false);
+ canvas.enableZ(false);
}
void doFrame(int frameNr) override {
int curFrame = frameNr % 150;