OLD | NEW |
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 Loading... |
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 } |
43 virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) SK_OVERRIDE
{ | 46 virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) SK_OVERRIDE
{ |
44 SkBitmap bm; | 47 SkBitmap bm; |
45 | 48 |
46 if (GetBitmapFromPaint(paint, &bm)) { | 49 if (GetBitmapFromPaint(paint, &bm)) { |
47 SkRect clipRect = SkRect::Make(draw.fRC->getBounds()); | 50 SkRect clipRect = SkRect::Make(draw.fRC->getBounds()); |
48 fPRCont->add(bm.pixelRef(), clipRect); | 51 fPRCont->add(bm.pixelRef(), clipRect); |
49 } | 52 } |
50 } | 53 } |
51 virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, size_t
count, | 54 virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode, size_t
count, |
52 const SkPoint points[], const SkPaint& paint) SK_OVE
RRIDE { | 55 const SkPoint points[], const SkPaint& paint) SK_OVE
RRIDE { |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 static void NotSupported() { | 312 static void NotSupported() { |
310 SkDEBUGFAIL("this method should never be called"); | 313 SkDEBUGFAIL("this method should never be called"); |
311 } | 314 } |
312 | 315 |
313 static void NothingToDo() {} | 316 static void NothingToDo() {} |
314 | 317 |
315 typedef SkBaseDevice INHERITED; | 318 typedef SkBaseDevice INHERITED; |
316 }; | 319 }; |
317 | 320 |
318 #endif // SkGatherPixelRefsAndRects_DEFINED | 321 #endif // SkGatherPixelRefsAndRects_DEFINED |
OLD | NEW |