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

Unified Diff: tools/PictureRenderer.h

Issue 1181633005: Convert PictureRenderer to SkPaintFilterCanvas (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: missing 'override' Created 5 years, 6 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
« no previous file with comments | « no previous file | tools/PictureRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureRenderer.h
diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h
index fadf97085fcd79f1b33e84b182cf7f24198dfa00..ca36961b43a4600a2ee3d7a73793736465f39c09 100644
--- a/tools/PictureRenderer.h
+++ b/tools/PictureRenderer.h
@@ -227,8 +227,13 @@ public:
#endif
void setDrawFilters(DrawFilterFlags const * const filters, const SkString& configName) {
- memcpy(fDrawFilters, filters, sizeof(fDrawFilters));
+ fHasDrawFilters = false;
fDrawFiltersConfig = configName;
+
+ for (size_t i = 0; i < SK_ARRAY_COUNT(fDrawFilters); ++i) {
+ fDrawFilters[i] = filters[i];
+ fHasDrawFilters |= SkToBool(filters[i]);
+ }
}
void setBBoxHierarchyType(BBoxHierarchyType bbhType) {
@@ -415,6 +420,7 @@ public:
, fDeviceType(kBitmap_DeviceType)
, fEnableWrites(false)
, fBBoxHierarchyType(kNone_BBoxHierarchyType)
+ , fHasDrawFilters(false)
, fScaleFactor(SK_Scalar1)
#if SK_SUPPORT_GPU
, fGrContextFactory(opts)
@@ -442,6 +448,7 @@ protected:
SkDeviceTypes fDeviceType;
bool fEnableWrites;
BBoxHierarchyType fBBoxHierarchyType;
+ bool fHasDrawFilters;
DrawFilterFlags fDrawFilters[SkDrawFilter::kTypeCount];
SkString fDrawFiltersConfig;
SkString fWritePath;
« no previous file with comments | « no previous file | tools/PictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698