OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 GrTexture_DEFINED | 9 #ifndef GrTexture_DEFINED |
10 #define GrTexture_DEFINED | 10 #define GrTexture_DEFINED |
(...skipping 14 matching lines...) Expand all Loading... |
25 */ | 25 */ |
26 virtual size_t gpuMemorySize() const SK_OVERRIDE; | 26 virtual size_t gpuMemorySize() const SK_OVERRIDE; |
27 | 27 |
28 // GrSurface overrides | 28 // GrSurface overrides |
29 virtual bool readPixels(int left, int top, int width, int height, | 29 virtual bool readPixels(int left, int top, int width, int height, |
30 GrPixelConfig config, | 30 GrPixelConfig config, |
31 void* buffer, | 31 void* buffer, |
32 size_t rowBytes = 0, | 32 size_t rowBytes = 0, |
33 uint32_t pixelOpsFlags = 0) SK_OVERRIDE; | 33 uint32_t pixelOpsFlags = 0) SK_OVERRIDE; |
34 | 34 |
35 virtual void writePixels(int left, int top, int width, int height, | 35 virtual bool writePixels(int left, int top, int width, int height, |
36 GrPixelConfig config, | 36 GrPixelConfig config, |
37 const void* buffer, | 37 const void* buffer, |
38 size_t rowBytes = 0, | 38 size_t rowBytes = 0, |
39 uint32_t pixelOpsFlags = 0) SK_OVERRIDE; | 39 uint32_t pixelOpsFlags = 0) SK_OVERRIDE; |
40 | 40 |
41 virtual GrTexture* asTexture() SK_OVERRIDE { return this; } | 41 virtual GrTexture* asTexture() SK_OVERRIDE { return this; } |
42 virtual const GrTexture* asTexture() const SK_OVERRIDE { return this; } | 42 virtual const GrTexture* asTexture() const SK_OVERRIDE { return this; } |
43 virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE { return fRenderTarget.
get(); } | 43 virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE { return fRenderTarget.
get(); } |
44 virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE { return fR
enderTarget.get(); } | 44 virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE { return fR
enderTarget.get(); } |
45 | 45 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 fTexture.reset(SkSafeRef(texture)); | 151 fTexture.reset(SkSafeRef(texture)); |
152 return texture; | 152 return texture; |
153 } | 153 } |
154 | 154 |
155 private: | 155 private: |
156 SkAutoTUnref<GrTexture> fTexture; | 156 SkAutoTUnref<GrTexture> fTexture; |
157 SkIPoint fOffset; | 157 SkIPoint fOffset; |
158 }; | 158 }; |
159 | 159 |
160 #endif | 160 #endif |
OLD | NEW |