Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: src/core/SkPictureCommon.h

Issue 2203453002: Sketch SkPictureRecorder::optimizeFor(GrContext*). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: enough for demo Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkPictureCommon.h
diff --git a/src/core/SkPictureCommon.h b/src/core/SkPictureCommon.h
index 1c38b049fa7314771a5c06f6762e696cd666f831..0a0c6b5ca96ef277c07e6a3d5d89fd105f50d77b 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;
}

Powered by Google App Engine
This is Rietveld 408576698