Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/gpu/GrContext.cpp

Issue 705593002: Refactor DrawTarget and GPU to be independent (Closed) Base URL: https://skia.googlesource.com/skia.git@early_clip
Patch Set: rebase on master Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContext.h" 9 #include "GrContext.h"
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 fLayerCache->freeAll(); 206 fLayerCache->freeAll();
207 } 207 }
208 208
209 void GrContext::resetContext(uint32_t state) { 209 void GrContext::resetContext(uint32_t state) {
210 fGpu->markContextDirty(state); 210 fGpu->markContextDirty(state);
211 } 211 }
212 212
213 void GrContext::freeGpuResources() { 213 void GrContext::freeGpuResources() {
214 this->flush(); 214 this->flush();
215 215
216 fGpu->purgeResources();
217 if (fDrawBuffer) { 216 if (fDrawBuffer) {
218 fDrawBuffer->purgeResources(); 217 fDrawBuffer->purgeResources();
219 } 218 }
220 219
221 fAARectRenderer->reset(); 220 fAARectRenderer->reset();
222 fOvalRenderer->reset(); 221 fOvalRenderer->reset();
223 222
224 fResourceCache->purgeAllUnlocked(); 223 fResourceCache->purgeAllUnlocked();
225 fFontCache->freeAll(); 224 fFontCache->freeAll();
226 fLayerCache->freeAll(); 225 fLayerCache->freeAll();
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1781 fResourceCache->printStats(); 1780 fResourceCache->printStats();
1782 } 1781 }
1783 #endif 1782 #endif
1784 1783
1785 #if GR_GPU_STATS 1784 #if GR_GPU_STATS
1786 const GrContext::GPUStats* GrContext::gpuStats() const { 1785 const GrContext::GPUStats* GrContext::gpuStats() const {
1787 return fGpu->gpuStats(); 1786 return fGpu->gpuStats();
1788 } 1787 }
1789 #endif 1788 #endif
1790 1789
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698