| 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 #include "SampleApp.h" | 7 #include "SampleApp.h" |
| 8 | 8 |
| 9 #include "SkData.h" | 9 #include "SkData.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 #if SK_SUPPORT_GPU | 1856 #if SK_SUPPORT_GPU |
| 1857 case '\\': | 1857 case '\\': |
| 1858 this->setDeviceType(kNullGPU_DeviceType); | 1858 this->setDeviceType(kNullGPU_DeviceType); |
| 1859 this->inval(NULL); | 1859 this->inval(NULL); |
| 1860 this->updateTitle(); | 1860 this->updateTitle(); |
| 1861 return true; | 1861 return true; |
| 1862 case 'p': | 1862 case 'p': |
| 1863 { | 1863 { |
| 1864 GrContext* grContext = this->getGrContext(); | 1864 GrContext* grContext = this->getGrContext(); |
| 1865 if (grContext) { | 1865 if (grContext) { |
| 1866 size_t cacheBytes = grContext->getGpuTextureCacheBytes(); | 1866 size_t cacheBytes; |
| 1867 grContext->getResourceCacheUsage(NULL, &cacheBytes); |
| 1867 grContext->freeGpuResources(); | 1868 grContext->freeGpuResources(); |
| 1868 SkDebugf("Purged %d bytes from the GPU resource cache.\n", | 1869 SkDebugf("Purged %d bytes from the GPU resource cache.\n", c
acheBytes); |
| 1869 cacheBytes); | |
| 1870 } | 1870 } |
| 1871 } | 1871 } |
| 1872 return true; | 1872 return true; |
| 1873 #endif | 1873 #endif |
| 1874 default: | 1874 default: |
| 1875 break; | 1875 break; |
| 1876 } | 1876 } |
| 1877 | 1877 |
| 1878 if (fAppMenu->handleKeyEquivalent(uni)|| fSlideMenu->handleKeyEquivalent(uni
)) { | 1878 if (fAppMenu->handleKeyEquivalent(uni)|| fSlideMenu->handleKeyEquivalent(uni
)) { |
| 1879 this->onUpdateMenu(fAppMenu); | 1879 this->onUpdateMenu(fAppMenu); |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2558 SkGraphics::Init(); | 2558 SkGraphics::Init(); |
| 2559 SkEvent::Init(); | 2559 SkEvent::Init(); |
| 2560 } | 2560 } |
| 2561 | 2561 |
| 2562 // FIXME: this should be in a header | 2562 // FIXME: this should be in a header |
| 2563 void application_term(); | 2563 void application_term(); |
| 2564 void application_term() { | 2564 void application_term() { |
| 2565 SkEvent::Term(); | 2565 SkEvent::Term(); |
| 2566 SkGraphics::Term(); | 2566 SkGraphics::Term(); |
| 2567 } | 2567 } |
| OLD | NEW |