aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureCommon.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-08-01 13:17:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-01 13:17:47 -0700
commit1bb5fecbea494d77d7d5633522be1cdc76d043ae (patch)
treec2f4f57c54f447dcd2bf881a1792e8aca98d4d6f /src/core/SkPictureCommon.h
parent7a34b1cd02ae65f2fb299752ebececec2b4f4285 (diff)
Sketch SkPictureRecorder::optimizeFor(GrContext*).
I'm open to API suggestions. We can pass this in finishAs(), up front, whatever. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2203453002 Review-Url: https://codereview.chromium.org/2203453002
Diffstat (limited to 'src/core/SkPictureCommon.h')
-rw-r--r--src/core/SkPictureCommon.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/SkPictureCommon.h b/src/core/SkPictureCommon.h
index 1c38b049fa..0a0c6b5ca9 100644
--- a/src/core/SkPictureCommon.h
+++ b/src/core/SkPictureCommon.h
@@ -45,18 +45,12 @@ struct SkBitmapHunter {
// Most draws-type ops have paints.
template <typename T>
- static SK_WHEN(T::kTags & SkRecords::kDraw_Tag, bool) CheckPaint(const T& op) {
+ static SK_WHEN(T::kTags & SkRecords::kHasPaint_Tag, bool) CheckPaint(const T& op) {
return PaintHasBitmap(AsPtr(op.paint));
}
- // SaveLayers also have a paint to check.
- static bool CheckPaint(const SkRecords::SaveLayer& op) {
- return PaintHasBitmap(AsPtr(op.paint));
- }
-
- // Shouldn't be any non-Draw non-SaveLayer ops with paints.
template <typename T>
- static SK_WHEN(!(T::kTags & SkRecords::kDraw_Tag), bool) CheckPaint(const T&) {
+ static SK_WHEN(!(T::kTags & SkRecords::kHasPaint_Tag), bool) CheckPaint(const T&) {
return false;
}