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 17 matching lines...) Expand all Loading... |
28 fSize.set(width, height); | 28 fSize.set(width, height); |
29 fPRCont = prCont; | 29 fPRCont = prCont; |
30 SkSafeRef(fPRCont); | 30 SkSafeRef(fPRCont); |
31 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(width, height)); | 31 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(width, height)); |
32 } | 32 } |
33 | 33 |
34 virtual ~SkGatherPixelRefsAndRectsDevice() { | 34 virtual ~SkGatherPixelRefsAndRectsDevice() { |
35 SkSafeUnref(fPRCont); | 35 SkSafeUnref(fPRCont); |
36 } | 36 } |
37 | 37 |
38 virtual int width() const SK_OVERRIDE { return fSize.width(); } | |
39 virtual int height() const SK_OVERRIDE { return fSize.height(); } | |
40 virtual bool isOpaque() const SK_OVERRIDE { return false; } | |
41 virtual SkImageInfo imageInfo() const SK_OVERRIDE { | 38 virtual SkImageInfo imageInfo() const SK_OVERRIDE { |
42 return fEmptyBitmap.info(); | 39 return fEmptyBitmap.info(); |
43 } | 40 } |
44 | 41 |
45 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; } | 42 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; } |
46 | 43 |
47 protected: | 44 protected: |
48 virtual bool filterTextFlags(const SkPaint& paint, TextFlags*) SK_OVERRIDE { | 45 virtual bool filterTextFlags(const SkPaint& paint, TextFlags*) SK_OVERRIDE { |
49 return false; | 46 return false; |
50 } | 47 } |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 static void NotSupported() { | 324 static void NotSupported() { |
328 SkDEBUGFAIL("this method should never be called"); | 325 SkDEBUGFAIL("this method should never be called"); |
329 } | 326 } |
330 | 327 |
331 static void NothingToDo() {} | 328 static void NothingToDo() {} |
332 | 329 |
333 typedef SkBaseDevice INHERITED; | 330 typedef SkBaseDevice INHERITED; |
334 }; | 331 }; |
335 | 332 |
336 #endif // SkGatherPixelRefsAndRects_DEFINED | 333 #endif // SkGatherPixelRefsAndRects_DEFINED |
OLD | NEW |