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

Unified Diff: src/pipe/SkGPipeRead.cpp

Issue 705633002: Revert of Override SkCanvas::drawImage() in SkDeferredCanvas and SkGPipe (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « src/pipe/SkGPipePriv.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipeRead.cpp
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp
index 222dc99e1ae9b676a208aa565c14e47f9cdd2a5d..8cb0e34d0a5d9c844ffa638b4ef081906d76a52d 100644
--- a/src/pipe/SkGPipeRead.cpp
+++ b/src/pipe/SkGPipeRead.cpp
@@ -408,11 +408,11 @@
static void drawPatch_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
SkGPipeState* state) {
-
+
unsigned flags = DrawOp_unpackFlags(op32);
-
+
const SkPoint* cubics = skip<SkPoint>(reader, SkPatchUtils::kNumCtrlPts);
-
+
const SkColor* colors = NULL;
if (flags & kDrawVertices_HasColors_DrawOpFlag) {
colors = skip<SkColor>(reader, SkPatchUtils::kNumCorners);
@@ -651,40 +651,6 @@
}
}
-static void drawImage_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
- SkGPipeState* state) {
- bool hasPaint = SkToBool(DrawOp_unpackFlags(op32) & kDrawBitmap_HasPaint_DrawOpFlag);
- // Balances call to ref() in SkGPipeWrite
- SkAutoTUnref<const SkImage> image (static_cast<const SkImage*>(reader->readPtr()));
-
- SkScalar left = reader->readScalar();
- SkScalar top = reader->readScalar();
-
- if (state->shouldDraw()) {
- canvas->drawImage(image, left, top, hasPaint ? &state->paint() : NULL);
- }
-}
-
-static void drawImageRect_rp(SkCanvas* canvas, SkReader32* reader,
- uint32_t op32, SkGPipeState* state) {
- unsigned flags = DrawOp_unpackFlags(op32);
- bool hasPaint = SkToBool(flags & kDrawBitmap_HasPaint_DrawOpFlag);
- bool hasSrc = SkToBool(flags & kDrawBitmap_HasSrcRect_DrawOpFlag);
- // Balances call to ref() in SkGPipeWrite
- SkAutoTUnref<const SkImage> image (static_cast<const SkImage*>(reader->readPtr()));
-
- const SkRect* src;
- if (hasSrc) {
- src = skip<SkRect>(reader);
- } else {
- src = NULL;
- }
- const SkRect* dst = skip<SkRect>(reader);
- if (state->shouldDraw()) {
- canvas->drawImageRect(image, src, *dst, hasPaint ? &state->paint() : NULL);
- }
-}
-
///////////////////////////////////////////////////////////////////////////////
static void drawData_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
@@ -865,8 +831,6 @@
drawClear_rp,
drawData_rp,
drawDRRect_rp,
- drawImage_rp,
- drawImageRect_rp,
drawOval_rp,
drawPaint_rp,
drawPatch_rp,
« no previous file with comments | « src/pipe/SkGPipePriv.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698