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

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

Issue 709133003: Snap optdrawstate in inorder draw buffer and pass into gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@remove_friends
Patch Set: 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/GrGpu.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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 fGpu = GrGpu::Create(backend, backendContext, this); 120 fGpu = GrGpu::Create(backend, backendContext, this);
121 if (NULL == fGpu) { 121 if (NULL == fGpu) {
122 return false; 122 return false;
123 } 123 }
124 this->initCommon(); 124 this->initCommon();
125 return true; 125 return true;
126 } 126 }
127 127
128 void GrContext::initCommon() { 128 void GrContext::initCommon() {
129 fDrawState = SkNEW(GrDrawState); 129 fDrawState = SkNEW(GrDrawState);
130 fGpu->setDrawState(fDrawState);
131 130
132 fResourceCache = SkNEW_ARGS(GrResourceCache, (fGpu->caps(), 131 fResourceCache = SkNEW_ARGS(GrResourceCache, (fGpu->caps(),
133 MAX_RESOURCE_CACHE_COUNT, 132 MAX_RESOURCE_CACHE_COUNT,
134 MAX_RESOURCE_CACHE_BYTES)); 133 MAX_RESOURCE_CACHE_BYTES));
135 fResourceCache->setOverbudgetCallback(OverbudgetCB, this); 134 fResourceCache->setOverbudgetCallback(OverbudgetCB, this);
136 fResourceCache2 = SkNEW(GrResourceCache2); 135 fResourceCache2 = SkNEW(GrResourceCache2);
137 136
138 fFontCache = SkNEW_ARGS(GrFontCache, (fGpu)); 137 fFontCache = SkNEW_ARGS(GrFontCache, (fGpu));
139 138
140 fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this))); 139 fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this)));
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 fResourceCache->printStats(); 1779 fResourceCache->printStats();
1781 } 1780 }
1782 #endif 1781 #endif
1783 1782
1784 #if GR_GPU_STATS 1783 #if GR_GPU_STATS
1785 const GrContext::GPUStats* GrContext::gpuStats() const { 1784 const GrContext::GPUStats* GrContext::gpuStats() const {
1786 return fGpu->gpuStats(); 1785 return fGpu->gpuStats();
1787 } 1786 }
1788 #endif 1787 #endif
1789 1788
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698