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 #include "PictureRenderer.h" | 8 #include "PictureRenderer.h" |
9 #include "picture_utils.h" | 9 #include "picture_utils.h" |
10 #include "SamplePipeControllers.h" | 10 #include "SamplePipeControllers.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 void PictureRenderer::resetState(bool callFinish) { | 241 void PictureRenderer::resetState(bool callFinish) { |
242 #if SK_SUPPORT_GPU | 242 #if SK_SUPPORT_GPU |
243 SkGLContextHelper* glContext = this->getGLContext(); | 243 SkGLContextHelper* glContext = this->getGLContext(); |
244 if (NULL == glContext) { | 244 if (NULL == glContext) { |
245 SkASSERT(kBitmap_DeviceType == fDeviceType); | 245 SkASSERT(kBitmap_DeviceType == fDeviceType); |
246 return; | 246 return; |
247 } | 247 } |
248 | 248 |
249 fGrContext->flush(); | 249 fGrContext->flush(); |
| 250 glContext->swapBuffers(); |
250 if (callFinish) { | 251 if (callFinish) { |
251 SK_GL(*glContext, Finish()); | 252 SK_GL(*glContext, Finish()); |
252 } | 253 } |
253 #endif | 254 #endif |
254 } | 255 } |
255 | 256 |
256 void PictureRenderer::purgeTextures() { | 257 void PictureRenderer::purgeTextures() { |
257 SkDiscardableMemoryPool* pool = SkGetGlobalDiscardableMemoryPool(); | 258 SkDiscardableMemoryPool* pool = SkGetGlobalDiscardableMemoryPool(); |
258 | 259 |
259 pool->dumpPool(); | 260 pool->dumpPool(); |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 virtual SkString getConfigNameInternal() SK_OVERRIDE { | 954 virtual SkString getConfigNameInternal() SK_OVERRIDE { |
954 return SkString("picture_clone"); | 955 return SkString("picture_clone"); |
955 } | 956 } |
956 }; | 957 }; |
957 | 958 |
958 PictureRenderer* CreatePictureCloneRenderer() { | 959 PictureRenderer* CreatePictureCloneRenderer() { |
959 return SkNEW(PictureCloneRenderer); | 960 return SkNEW(PictureCloneRenderer); |
960 } | 961 } |
961 | 962 |
962 } // namespace sk_tools | 963 } // namespace sk_tools |
OLD | NEW |