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 #ifndef SkGpuDevice_DEFINED | 9 #ifndef SkGpuDevice_DEFINED |
10 #define SkGpuDevice_DEFINED | 10 #define SkGpuDevice_DEFINED |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 kGeneral_U
sage, | 55 kGeneral_U
sage, |
56 props.pixe
lGeometry())); | 56 props.pixe
lGeometry())); |
57 return static_cast<SkGpuDevice*>(dev); | 57 return static_cast<SkGpuDevice*>(dev); |
58 } | 58 } |
59 | 59 |
60 GrContext* context() const { return fRenderTarget->getContext(); } | 60 GrContext* context() const { return fRenderTarget->getContext(); } |
61 | 61 |
62 // set all pixels to 0 | 62 // set all pixels to 0 |
63 void clearAll(); | 63 void clearAll(); |
64 | 64 |
| 65 void replaceRenderTarget(bool shouldRetainContent); |
| 66 |
65 GrRenderTarget* accessRenderTarget() SK_OVERRIDE; | 67 GrRenderTarget* accessRenderTarget() SK_OVERRIDE; |
66 | 68 |
67 SkImageInfo imageInfo() const SK_OVERRIDE { | 69 SkImageInfo imageInfo() const SK_OVERRIDE { |
68 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo
::MakeUnknown(); | 70 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo
::MakeUnknown(); |
69 } | 71 } |
70 | 72 |
71 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } | 73 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } |
72 | 74 |
73 void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; | 75 void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; |
74 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 76 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 const GrTextureParams& params, | 194 const GrTextureParams& params, |
193 const SkPaint& paint, | 195 const SkPaint& paint, |
194 SkCanvas::DrawBitmapRectFlags flags, | 196 SkCanvas::DrawBitmapRectFlags flags, |
195 int tileSize, | 197 int tileSize, |
196 bool bicubic); | 198 bool bicubic); |
197 | 199 |
198 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 200 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
199 | 201 |
200 static SkPicture::AccelData::Key ComputeAccelDataKey(); | 202 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
201 | 203 |
| 204 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, |
| 205 int sampleCount); |
| 206 |
202 typedef SkBaseDevice INHERITED; | 207 typedef SkBaseDevice INHERITED; |
203 }; | 208 }; |
204 | 209 |
205 #endif | 210 #endif |
OLD | NEW |