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

Side by Side Diff: src/utils/SkPictureUtils.cpp

Issue 783493002: Change clear() to respect the clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBBoxHierarchy.h" 8 #include "SkBBoxHierarchy.h"
9 #include "SkBitmapDevice.h" 9 #include "SkBitmapDevice.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 virtual void lockPixels() SK_OVERRIDE { nothing_to_do(); } 71 virtual void lockPixels() SK_OVERRIDE { nothing_to_do(); }
72 virtual void unlockPixels() SK_OVERRIDE { nothing_to_do(); } 72 virtual void unlockPixels() SK_OVERRIDE { nothing_to_do(); }
73 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal se; } 73 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal se; }
74 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return false; } 74 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return false; }
75 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImag eFilter::Context&, 75 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImag eFilter::Context&,
76 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { 76 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE {
77 return false; 77 return false;
78 } 78 }
79 79
80 virtual void clear(SkColor color) SK_OVERRIDE {
81 nothing_to_do();
82 }
83
84 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE { 80 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE {
85 this->addBitmapFromPaint(paint); 81 this->addBitmapFromPaint(paint);
86 } 82 }
87 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t, 83 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t,
88 const SkPoint[], const SkPaint& paint) SK_OVERRIDE { 84 const SkPoint[], const SkPaint& paint) SK_OVERRIDE {
89 this->addBitmapFromPaint(paint); 85 this->addBitmapFromPaint(paint);
90 } 86 }
91 virtual void drawRect(const SkDraw&, const SkRect&, 87 virtual void drawRect(const SkDraw&, const SkRect&,
92 const SkPaint& paint) SK_OVERRIDE { 88 const SkPaint& paint) SK_OVERRIDE {
93 this->addBitmapFromPaint(paint); 89 this->addBitmapFromPaint(paint);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 if (pict->fBBH.get()) { 228 if (pict->fBBH.get()) {
233 byteCount += pict->fBBH->bytesUsed(); 229 byteCount += pict->fBBH->bytesUsed();
234 } 230 }
235 MeasureRecords visitor; 231 MeasureRecords visitor;
236 for (unsigned curOp = 0; curOp < pict->fRecord->count(); curOp++) { 232 for (unsigned curOp = 0; curOp < pict->fRecord->count(); curOp++) {
237 byteCount += pict->fRecord->visit<size_t>(curOp, visitor); 233 byteCount += pict->fRecord->visit<size_t>(curOp, visitor);
238 } 234 }
239 235
240 return byteCount; 236 return byteCount;
241 } 237 }
OLDNEW
« no previous file with comments | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698