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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { | 59 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { |
60 SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imag
eInfo(), | 60 SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imag
eInfo(), |
61 kGeneral_U
sage, | 61 kGeneral_U
sage, |
62 props.pixe
lGeometry())); | 62 props.pixe
lGeometry())); |
63 return static_cast<SkGpuDevice*>(dev); | 63 return static_cast<SkGpuDevice*>(dev); |
64 } | 64 } |
65 | 65 |
66 GrContext* context() const { return fContext; } | 66 GrContext* context() const { return fContext; } |
67 | 67 |
| 68 // set all pixels to 0 |
| 69 void clearAll(); |
| 70 |
68 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; | 71 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; |
69 | 72 |
70 virtual SkImageInfo imageInfo() const SK_OVERRIDE { | 73 virtual SkImageInfo imageInfo() const SK_OVERRIDE { |
71 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo
::MakeUnknown(); | 74 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo
::MakeUnknown(); |
72 } | 75 } |
73 | 76 |
74 virtual void clear(SkColor color) SK_OVERRIDE; | |
75 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; | 77 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; |
76 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 78 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
77 const SkPoint[], const SkPaint& paint) SK_OVERRIDE; | 79 const SkPoint[], const SkPaint& paint) SK_OVERRIDE; |
78 virtual void drawRect(const SkDraw&, const SkRect& r, | 80 virtual void drawRect(const SkDraw&, const SkRect& r, |
79 const SkPaint& paint) SK_OVERRIDE; | 81 const SkPaint& paint) SK_OVERRIDE; |
80 virtual void drawRRect(const SkDraw&, const SkRRect& r, | 82 virtual void drawRRect(const SkDraw&, const SkRRect& r, |
81 const SkPaint& paint) SK_OVERRIDE; | 83 const SkPaint& paint) SK_OVERRIDE; |
82 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, | 84 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, |
83 const SkRRect& inner, const SkPaint& paint) SK_OVERR
IDE; | 85 const SkRRect& inner, const SkPaint& paint) SK_OVERR
IDE; |
84 virtual void drawOval(const SkDraw&, const SkRect& oval, | 86 virtual void drawOval(const SkDraw&, const SkRect& oval, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 bool filterTexture(GrContext*, GrTexture*, const SkImageFilter*, | 206 bool filterTexture(GrContext*, GrTexture*, const SkImageFilter*, |
205 const SkImageFilter::Context&, | 207 const SkImageFilter::Context&, |
206 SkBitmap* result, SkIPoint* offset); | 208 SkBitmap* result, SkIPoint* offset); |
207 | 209 |
208 static SkPicture::AccelData::Key ComputeAccelDataKey(); | 210 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
209 | 211 |
210 typedef SkBaseDevice INHERITED; | 212 typedef SkBaseDevice INHERITED; |
211 }; | 213 }; |
212 | 214 |
213 #endif | 215 #endif |
OLD | NEW |