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

Unified Diff: src/core/SkCanvas.cpp

Issue 2257643003: remove disable aa/dither flags from Props -- never used (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: restore gm, only remove disable aspects Created 4 years, 4 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 | « include/core/SkSurfaceProps.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 539fd36028ac214dad18d49df808b34b6a187ea9..09c50c69b0248cf2dc83e95c87f07d662c80252c 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -175,19 +175,6 @@ void SkCanvas::predrawNotify(const SkRect* rect, const SkPaint* paint,
///////////////////////////////////////////////////////////////////////////////
-static uint32_t filter_paint_flags(const SkSurfaceProps& props, uint32_t flags) {
- const uint32_t propFlags = props.flags();
- if (propFlags & SkSurfaceProps::kDisallowDither_Flag) {
- flags &= ~SkPaint::kDither_Flag;
- }
- if (propFlags & SkSurfaceProps::kDisallowAntiAlias_Flag) {
- flags &= ~SkPaint::kAntiAlias_Flag;
- }
- return flags;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
/* This is the record we keep for each SkBaseDevice that the user installs.
The clip/matrix/proc are fields that reflect the top of the save/restore
stack. Whenever the canvas changes, it marks a dirty flag, and then before
@@ -507,15 +494,6 @@ public:
// can we be marked as simple?
fIsSimple = !fFilter && !fTempLayerForImageFilter;
}
-
- uint32_t oldFlags = paint.getFlags();
- fNewPaintFlags = filter_paint_flags(props, oldFlags);
- if (fIsSimple && (fNewPaintFlags != oldFlags)) {
- SkPaint* paint = set_if_needed(&fLazyPaintInit, fOrigPaint);
- paint->setFlags(fNewPaintFlags);
- fPaint = paint;
- // if we're not simple, doNext() will take care of calling setFlags()
- }
}
~AutoDrawLooper() {
@@ -549,7 +527,6 @@ private:
SkDrawFilter* fFilter;
const SkPaint* fPaint;
int fSaveCount;
- uint32_t fNewPaintFlags;
bool fTempLayerForImageFilter;
bool fDone;
bool fIsSimple;
@@ -566,7 +543,6 @@ bool AutoDrawLooper::doNext(SkDrawFilter::Type drawType) {
SkPaint* paint = fLazyPaintPerLooper.set(fLazyPaintInit.isValid() ?
*fLazyPaintInit.get() : fOrigPaint);
- paint->setFlags(fNewPaintFlags);
if (fTempLayerForImageFilter) {
paint->setImageFilter(nullptr);
« no previous file with comments | « include/core/SkSurfaceProps.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698