| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrRenderTarget_DEFINED | 8 #ifndef GrRenderTarget_DEFINED |
| 9 #define GrRenderTarget_DEFINED | 9 #define GrRenderTarget_DEFINED |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 virtual const GrTexture* asTexture() const SK_OVERRIDE { return fTexture; } | 36 virtual const GrTexture* asTexture() const SK_OVERRIDE { return fTexture; } |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * @return this render target. | 39 * @return this render target. |
| 40 */ | 40 */ |
| 41 virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE { return this; } | 41 virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE { return this; } |
| 42 virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE { | 42 virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE { |
| 43 return this; | 43 return this; |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual bool readPixels(int left, int top, int width, int height, | |
| 47 GrPixelConfig config, | |
| 48 void* buffer, | |
| 49 size_t rowBytes = 0, | |
| 50 uint32_t pixelOpsFlags = 0) SK_OVERRIDE; | |
| 51 | |
| 52 virtual void writePixels(int left, int top, int width, int height, | |
| 53 GrPixelConfig config, | |
| 54 const void* buffer, | |
| 55 size_t rowBytes = 0, | |
| 56 uint32_t pixelOpsFlags = 0) SK_OVERRIDE; | |
| 57 | |
| 58 // GrRenderTarget | 46 // GrRenderTarget |
| 59 /** | 47 /** |
| 60 * If this RT is multisampled, this is the multisample buffer | 48 * If this RT is multisampled, this is the multisample buffer |
| 61 * @return the 3D API's handle to this object (e.g. FBO ID in OpenGL) | 49 * @return the 3D API's handle to this object (e.g. FBO ID in OpenGL) |
| 62 */ | 50 */ |
| 63 virtual GrBackendObject getRenderTargetHandle() const = 0; | 51 virtual GrBackendObject getRenderTargetHandle() const = 0; |
| 64 | 52 |
| 65 /** | 53 /** |
| 66 * If this RT is multisampled, this is the buffer it is resolved to. | 54 * If this RT is multisampled, this is the buffer it is resolved to. |
| 67 * Otherwise, same as getRenderTargetHandle(). | 55 * Otherwise, same as getRenderTargetHandle(). |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 156 |
| 169 GrStencilBuffer* fStencilBuffer; | 157 GrStencilBuffer* fStencilBuffer; |
| 170 GrTexture* fTexture; // not ref'ed | 158 GrTexture* fTexture; // not ref'ed |
| 171 | 159 |
| 172 SkIRect fResolveRect; | 160 SkIRect fResolveRect; |
| 173 | 161 |
| 174 typedef GrSurface INHERITED; | 162 typedef GrSurface INHERITED; |
| 175 }; | 163 }; |
| 176 | 164 |
| 177 #endif | 165 #endif |
| OLD | NEW |