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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 2241473002: Delete quickRejectY() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/SkCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 307e9468717352ca5e2c2bb6c107381805fd7f57..ba38bbd2ad8c0ab44b0b1368059dc07b1f1549bd 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -419,7 +419,11 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
const SkPoint* pos = (const SkPoint*)reader->skip(points * sizeof(SkPoint));
const SkScalar top = reader->readScalar();
const SkScalar bottom = reader->readScalar();
- if (!canvas->quickRejectY(top, bottom) && paint) {
+ SkRect src;
+ canvas->getClipBounds(&src);
+ src.fTop = top;
+ src.fBottom = bottom;
+ if (!canvas->quickReject(src) && paint) {
reed1 2016/08/11 16:49:08 Lets write own own check here -- should be trivial
msarett 2016/08/11 16:56:49 Of course, thanks. Done.
canvas->drawPosText(text.text(), text.length(), pos, *paint);
}
} break;
@@ -443,7 +447,11 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
const SkScalar top = *xpos++;
const SkScalar bottom = *xpos++;
const SkScalar constY = *xpos++;
- if (!canvas->quickRejectY(top, bottom) && paint) {
+ SkRect src;
+ canvas->getClipBounds(&src);
+ src.fTop = top;
+ src.fBottom = bottom;
+ if (!canvas->quickReject(src) && paint) {
canvas->drawPosTextH(text.text(), text.length(), xpos, constY, *paint);
}
} break;
@@ -498,7 +506,11 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
// ptr[1] == y
// ptr[2] == top
// ptr[3] == bottom
- if (!canvas->quickRejectY(ptr[2], ptr[3]) && paint) {
+ SkRect src;
+ canvas->getClipBounds(&src);
+ src.fTop = ptr[2];
+ src.fBottom = ptr[3];
+ if (!canvas->quickReject(src) && paint) {
canvas->drawText(text.text(), text.length(), ptr[0], ptr[1], *paint);
}
} break;
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698