OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 */ | 56 */ |
57 SkGpuDevice(GrContext*, GrTexture*); | 57 SkGpuDevice(GrContext*, GrTexture*); |
58 | 58 |
59 virtual ~SkGpuDevice(); | 59 virtual ~SkGpuDevice(); |
60 | 60 |
61 GrContext* context() const { return fContext; } | 61 GrContext* context() const { return fContext; } |
62 | 62 |
63 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; | 63 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; |
64 | 64 |
65 // overrides from SkBaseDevice | 65 // overrides from SkBaseDevice |
| 66 virtual uint32_t getDeviceCapabilities() SK_OVERRIDE { |
| 67 return 0; |
| 68 } |
| 69 virtual int width() const SK_OVERRIDE { |
| 70 return NULL == fRenderTarget ? 0 : fRenderTarget->width(); |
| 71 } |
| 72 virtual int height() const SK_OVERRIDE { |
| 73 return NULL == fRenderTarget ? 0 : fRenderTarget->height(); |
| 74 } |
| 75 virtual void getGlobalBounds(SkIRect* bounds) const SK_OVERRIDE; |
| 76 virtual bool isOpaque() const SK_OVERRIDE { |
| 77 return NULL == fRenderTarget ? false |
| 78 : kRGB_565_GrPixelConfig == fRenderTarget->
config(); |
| 79 } |
| 80 virtual SkBitmap::Config config() const SK_OVERRIDE; |
66 | 81 |
67 virtual void clear(SkColor color) SK_OVERRIDE; | 82 virtual void clear(SkColor color) SK_OVERRIDE; |
68 virtual void writePixels(const SkBitmap& bitmap, int x, int y, | 83 virtual void writePixels(const SkBitmap& bitmap, int x, int y, |
69 SkCanvas::Config8888 config8888) SK_OVERRIDE; | 84 SkCanvas::Config8888 config8888) SK_OVERRIDE; |
70 | 85 |
71 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; | 86 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; |
72 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 87 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
73 const SkPoint[], const SkPaint& paint) SK_OVERRIDE; | 88 const SkPoint[], const SkPaint& paint) SK_OVERRIDE; |
74 virtual void drawRect(const SkDraw&, const SkRect& r, | 89 virtual void drawRect(const SkDraw&, const SkRect& r, |
75 const SkPaint& paint) SK_OVERRIDE; | 90 const SkPaint& paint) SK_OVERRIDE; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 204 |
190 /** | 205 /** |
191 * Returns non-initialized instance. | 206 * Returns non-initialized instance. |
192 */ | 207 */ |
193 GrTextContext* getTextContext(); | 208 GrTextContext* getTextContext(); |
194 | 209 |
195 typedef SkBitmapDevice INHERITED; | 210 typedef SkBitmapDevice INHERITED; |
196 }; | 211 }; |
197 | 212 |
198 #endif | 213 #endif |
OLD | NEW |