Improve API for skipping render tasks
This lets the user query if a task is skippable, makes
the naming clearer, and only calls the virtual once.
Bug: skia:10877
Change-Id: Ia8a7e0e3014d447bd8b4e914edf4f705a2ea107b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401856
Commit-Queue: Adlai Holler <[email protected]>
Auto-Submit: Adlai Holler <[email protected]>
Reviewed-by: Robert Phillips <[email protected]>
diff --git a/tests/WrappedSurfaceCopyOnWriteTest.cpp b/tests/WrappedSurfaceCopyOnWriteTest.cpp
index 52fbad6..1a91568 100644
--- a/tests/WrappedSurfaceCopyOnWriteTest.cpp
+++ b/tests/WrappedSurfaceCopyOnWriteTest.cpp
@@ -110,7 +110,7 @@
return;
}
- task->canSkip();
+ task->makeSkippable();
SkAutoPixmapStorage pixels;
pixels.alloc(SkImageInfo::Make({10, 10}, kRGBA_8888_SkColorType, kPremul_SkAlphaType));
@@ -151,7 +151,7 @@
temp->clear(SkPMColor4f{0, 0, 0, 0});
GrSurfaceProxyView readView = dst->readSurfaceView();
- task->canSkip();
+ task->makeSkippable();
SkAutoPixmapStorage pixels;
pixels.alloc(SkImageInfo::Make({10, 10}, kRGBA_8888_SkColorType, kPremul_SkAlphaType));