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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 virtual ~SkGpuDevice(); | 51 virtual ~SkGpuDevice(); |
52 | 52 |
53 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { | 53 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { |
54 SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imag
eInfo(), | 54 SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imag
eInfo(), |
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 fContext; } |
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); | 65 void replaceRenderTarget(bool shouldRetainContent); |
66 | 66 |
67 GrRenderTarget* accessRenderTarget() SK_OVERRIDE; | 67 GrRenderTarget* accessRenderTarget() SK_OVERRIDE; |
68 | 68 |
69 SkImageInfo imageInfo() const SK_OVERRIDE { | 69 SkImageInfo imageInfo() const SK_OVERRIDE { |
70 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo
::MakeUnknown(); | 70 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo
::MakeUnknown(); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 static SkPicture::AccelData::Key ComputeAccelDataKey(); | 204 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
205 | 205 |
206 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, | 206 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, |
207 int sampleCount); | 207 int sampleCount); |
208 | 208 |
209 typedef SkBaseDevice INHERITED; | 209 typedef SkBaseDevice INHERITED; |
210 }; | 210 }; |
211 | 211 |
212 #endif | 212 #endif |
OLD | NEW |