| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 GrSurfaceProxy_DEFINED | 8 #ifndef GrSurfaceProxy_DEFINED |
| 9 #define GrSurfaceProxy_DEFINED | 9 #define GrSurfaceProxy_DEFINED |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 int width() const { return fDesc.fWidth; } | 85 int width() const { return fDesc.fWidth; } |
| 86 int height() const { return fDesc.fHeight; } | 86 int height() const { return fDesc.fHeight; } |
| 87 GrPixelConfig config() const { return fDesc.fConfig; } | 87 GrPixelConfig config() const { return fDesc.fConfig; } |
| 88 | 88 |
| 89 uint32_t uniqueID() const { return fUniqueID; } | 89 uint32_t uniqueID() const { return fUniqueID; } |
| 90 | 90 |
| 91 /** | 91 /** |
| 92 * Helper that gets the width and height of the surface as a bounding rectan
gle. | 92 * Helper that gets the width and height of the surface as a bounding rectan
gle. |
| 93 */ | 93 */ |
| 94 SkRect getBoundsRect() const { return SkRect::MakeIWH(this->width(), this->h
eight()); } | 94 SkRect getBoundsRect() const { return SkRect::MakeIWH(this->width(), this->h
eight()); } |
| 95 | 95 |
| 96 /** | 96 /** |
| 97 * @return the texture proxy associated with the surface proxy, may be NULL. | 97 * @return the texture proxy associated with the surface proxy, may be NULL. |
| 98 */ | 98 */ |
| 99 virtual GrTextureProxy* asTextureProxy() { return nullptr; } | 99 virtual GrTextureProxy* asTextureProxy() { return nullptr; } |
| 100 virtual const GrTextureProxy* asTextureProxy() const { return nullptr; } | 100 virtual const GrTextureProxy* asTextureProxy() const { return nullptr; } |
| 101 | 101 |
| 102 /** | 102 /** |
| 103 * @return the render target proxy associated with the surface proxy, may be
NULL. | 103 * @return the render target proxy associated with the surface proxy, may be
NULL. |
| 104 */ | 104 */ |
| 105 virtual GrRenderTargetProxy* asRenderTargetProxy() { return nullptr; } | 105 virtual GrRenderTargetProxy* asRenderTargetProxy() { return nullptr; } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // This back-pointer is required so that we can add a dependancy between | 172 // This back-pointer is required so that we can add a dependancy between |
| 173 // the opList used to create the current contents of this surface | 173 // the opList used to create the current contents of this surface |
| 174 // and the opList of a destination surface to which this one is being drawn
or copied. | 174 // and the opList of a destination surface to which this one is being drawn
or copied. |
| 175 GrOpList* fLastOpList; | 175 GrOpList* fLastOpList; |
| 176 | 176 |
| 177 | 177 |
| 178 typedef GrIORefProxy INHERITED; | 178 typedef GrIORefProxy INHERITED; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 #endif | 181 #endif |
| OLD | NEW |