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

Unified Diff: src/core/SkCanvas.cpp

Issue 1925693002: remove 'deprecated' region from SkDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 4 years, 8 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/SkDraw.h ('k') | src/core/SkDevice.cpp » ('j') | 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 905849254c7fcf5ad6689fe9354cc326ff395992..6c4cd272502aca824c05f77ffe762032b85fc0b4 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -349,7 +349,6 @@ public:
if (rec && rec->fDevice) {
fMatrix = rec->fMatrix;
- fClip = &((SkRasterClip*)&rec->fClip)->forceGetBW();
fRC = &rec->fClip;
fDevice = rec->fDevice;
if (!fDevice->accessPixels(&fDst)) {
@@ -367,10 +366,10 @@ public:
}
SkBaseDevice* getDevice() const { return fDevice; }
+ const SkRasterClip& getClip() const { return *fRC; }
int getX() const { return fDevice->getOrigin().x(); }
int getY() const { return fDevice->getOrigin().y(); }
const SkMatrix& getMatrix() const { return *fMatrix; }
- const SkRegion& getClip() const { return *fClip; }
const SkPaint* getPaint() const { return fPaint; }
private:
@@ -2503,7 +2502,7 @@ void SkCanvas::DrawTextDecorations(const SkDraw& draw, const SkPaint& paint,
// nothing to draw
if (text == nullptr || byteLength == 0 ||
- draw.fClip->isEmpty() ||
+ draw.fRC->isEmpty() ||
(paint.getAlpha() == 0 && paint.getXfermode() == nullptr)) {
return;
}
@@ -2994,7 +2993,7 @@ const SkPaint& SkCanvas::LayerIter::paint() const {
return *paint;
}
-const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); }
+const SkRasterClip& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); }
int SkCanvas::LayerIter::x() const { return fImpl->getX(); }
int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
« no previous file with comments | « include/core/SkDraw.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698