OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 PictureRenderer_DEFINED | 8 #ifndef PictureRenderer_DEFINED |
9 #define PictureRenderer_DEFINED | 9 #define PictureRenderer_DEFINED |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 virtual TiledPictureRenderer* getTiledRenderer() { return NULL; } | 141 virtual TiledPictureRenderer* getTiledRenderer() { return NULL; } |
142 | 142 |
143 /** | 143 /** |
144 * Resets the GPU's state. Does nothing if the backing is raster. For a GPU
renderer, calls | 144 * Resets the GPU's state. Does nothing if the backing is raster. For a GPU
renderer, calls |
145 * flush, and calls finish if callFinish is true. | 145 * flush, and calls finish if callFinish is true. |
146 * @param callFinish Whether to call finish. | 146 * @param callFinish Whether to call finish. |
147 */ | 147 */ |
148 void resetState(bool callFinish); | 148 void resetState(bool callFinish); |
149 | 149 |
150 /** | 150 /** |
| 151 * Remove all decoded textures from the CPU caches and all uploaded textures |
| 152 * from the GPU. |
| 153 */ |
| 154 void purgeTextures(); |
| 155 |
| 156 /** |
151 * Set the backend type. Returns true on success and false on failure. | 157 * Set the backend type. Returns true on success and false on failure. |
152 */ | 158 */ |
153 bool setDeviceType(SkDeviceTypes deviceType) { | 159 bool setDeviceType(SkDeviceTypes deviceType) { |
154 fDeviceType = deviceType; | 160 fDeviceType = deviceType; |
155 #if SK_SUPPORT_GPU | 161 #if SK_SUPPORT_GPU |
156 // In case this function is called more than once | 162 // In case this function is called more than once |
157 SkSafeUnref(fGrContext); | 163 SkSafeUnref(fGrContext); |
158 fGrContext = NULL; | 164 fGrContext = NULL; |
159 // Set to Native so it will have an initial value. | 165 // Set to Native so it will have an initial value. |
160 GrContextFactory::GLContextType glContextType = GrContextFactory::kNativ
e_GLContextType; | 166 GrContextFactory::GLContextType glContextType = GrContextFactory::kNativ
e_GLContextType; |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 | 583 |
578 typedef PictureRenderer INHERITED; | 584 typedef PictureRenderer INHERITED; |
579 }; | 585 }; |
580 | 586 |
581 extern PictureRenderer* CreateGatherPixelRefsRenderer(); | 587 extern PictureRenderer* CreateGatherPixelRefsRenderer(); |
582 extern PictureRenderer* CreatePictureCloneRenderer(); | 588 extern PictureRenderer* CreatePictureCloneRenderer(); |
583 | 589 |
584 } | 590 } |
585 | 591 |
586 #endif // PictureRenderer_DEFINED | 592 #endif // PictureRenderer_DEFINED |
OLD | NEW |