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

Side by Side Diff: src/utils/SkGatherPixelRefsAndRects.h

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/SkDeferredCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef SkGatherPixelRefsAndRects_DEFINED 8 #ifndef SkGatherPixelRefsAndRects_DEFINED
9 #define SkGatherPixelRefsAndRects_DEFINED 9 #define SkGatherPixelRefsAndRects_DEFINED
10 10
(...skipping 22 matching lines...) Expand all
33 33
34 virtual ~SkGatherPixelRefsAndRectsDevice() { 34 virtual ~SkGatherPixelRefsAndRectsDevice() {
35 SkSafeUnref(fPRCont); 35 SkSafeUnref(fPRCont);
36 } 36 }
37 37
38 virtual SkImageInfo imageInfo() const SK_OVERRIDE { 38 virtual SkImageInfo imageInfo() const SK_OVERRIDE {
39 return fEmptyBitmap.info(); 39 return fEmptyBitmap.info();
40 } 40 }
41 41
42 protected: 42 protected:
43 virtual void clear(SkColor color) SK_OVERRIDE {
44 NothingToDo();
45 }
46 virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) SK_OVERRIDE { 43 virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) SK_OVERRIDE {
47 SkBitmap bm; 44 SkBitmap bm;
48 45
49 if (GetBitmapFromPaint(paint, &bm)) { 46 if (GetBitmapFromPaint(paint, &bm)) {
50 SkRect clipRect = SkRect::Make(draw.fRC->getBounds()); 47 SkRect clipRect = SkRect::Make(draw.fRC->getBounds());
51 fPRCont->add(bm.pixelRef(), clipRect); 48 fPRCont->add(bm.pixelRef(), clipRect);
52 } 49 }
53 } 50 }
54 virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, size_t count, 51 virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, size_t count,
55 const SkPoint points[], const SkPaint& paint) SK_OVE RRIDE { 52 const SkPoint points[], const SkPaint& paint) SK_OVE RRIDE {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 static void NotSupported() { 309 static void NotSupported() {
313 SkDEBUGFAIL("this method should never be called"); 310 SkDEBUGFAIL("this method should never be called");
314 } 311 }
315 312
316 static void NothingToDo() {} 313 static void NothingToDo() {}
317 314
318 typedef SkBaseDevice INHERITED; 315 typedef SkBaseDevice INHERITED;
319 }; 316 };
320 317
321 #endif // SkGatherPixelRefsAndRects_DEFINED 318 #endif // SkGatherPixelRefsAndRects_DEFINED
OLDNEW
« no previous file with comments | « src/utils/SkDeferredCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698