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

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

Issue 1287193008: Add ANGLE workaround to prefer flushes over VRAM usage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comment Created 5 years, 4 months 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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 fGpu = GrGpu::Create(backend, backendContext, options, this); 175 fGpu = GrGpu::Create(backend, backendContext, options, this);
176 if (!fGpu) { 176 if (!fGpu) {
177 return false; 177 return false;
178 } 178 }
179 this->initCommon(); 179 this->initCommon();
180 return true; 180 return true;
181 } 181 }
182 182
183 void GrContext::initCommon() { 183 void GrContext::initCommon() {
184 fCaps = SkRef(fGpu->caps()); 184 fCaps = SkRef(fGpu->caps());
185 fResourceCache = SkNEW(GrResourceCache); 185 fResourceCache = SkNEW_ARGS(GrResourceCache, (fCaps));
186 fResourceCache->setOverBudgetCallback(OverBudgetCB, this); 186 fResourceCache->setOverBudgetCallback(OverBudgetCB, this);
187 fResourceProvider = SkNEW_ARGS(GrResourceProvider, (fGpu, fResourceCache)); 187 fResourceProvider = SkNEW_ARGS(GrResourceProvider, (fGpu, fResourceCache));
188 188
189 fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this))); 189 fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this)));
190 190
191 fDidTestPMConversions = false; 191 fDidTestPMConversions = false;
192 192
193 fDrawingMgr.init(this); 193 fDrawingMgr.init(this);
194 194
195 // GrBatchFontCache will eventually replace GrFontCache 195 // GrBatchFontCache will eventually replace GrFontCache
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 ////////////////////////////////////////////////////////////////////////////// 754 //////////////////////////////////////////////////////////////////////////////
755 755
756 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { 756 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) {
757 fGpu->addGpuTraceMarker(marker); 757 fGpu->addGpuTraceMarker(marker);
758 } 758 }
759 759
760 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { 760 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
761 fGpu->removeGpuTraceMarker(marker); 761 fGpu->removeGpuTraceMarker(marker);
762 } 762 }
763 763
OLDNEW
« src/gpu/GrCaps.cpp ('K') | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698