Index: src/core/SkPicturePlayback.cpp |
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp |
index 307e9468717352ca5e2c2bb6c107381805fd7f57..f30cf9f8b13ea4788d3d945cfd5a6edc10a3e659 100644 |
--- a/src/core/SkPicturePlayback.cpp |
+++ b/src/core/SkPicturePlayback.cpp |
@@ -419,7 +419,9 @@ 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 clip; |
+ canvas->getClipBounds(&clip); |
+ if (top < clip.fBottom && bottom > clip.fTop && paint) { |
canvas->drawPosText(text.text(), text.length(), pos, *paint); |
} |
} break; |
@@ -443,7 +445,9 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, |
const SkScalar top = *xpos++; |
const SkScalar bottom = *xpos++; |
const SkScalar constY = *xpos++; |
- if (!canvas->quickRejectY(top, bottom) && paint) { |
+ SkRect clip; |
+ canvas->getClipBounds(&clip); |
+ if (top < clip.fBottom && bottom > clip.fTop && paint) { |
canvas->drawPosTextH(text.text(), text.length(), xpos, constY, *paint); |
} |
} break; |
@@ -498,7 +502,11 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, |
// ptr[1] == y |
// ptr[2] == top |
// ptr[3] == bottom |
- if (!canvas->quickRejectY(ptr[2], ptr[3]) && paint) { |
+ SkRect clip; |
+ canvas->getClipBounds(&clip); |
+ float top = ptr[2]; |
+ float bottom = ptr[3]; |
+ if (top < clip.fBottom && bottom > clip.fTop && paint) { |
canvas->drawText(text.text(), text.length(), ptr[0], ptr[1], *paint); |
} |
} break; |