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

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

Issue 650273003: Change GrTextContext fallbacks to be a linked list chain. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix include Created 6 years, 2 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
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 if (resourceBytes) { 244 if (resourceBytes) {
245 *resourceBytes = fResourceCache->getCachedResourceBytes(); 245 *resourceBytes = fResourceCache->getCachedResourceBytes();
246 } 246 }
247 } 247 }
248 248
249 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget, 249 GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget,
250 const SkDeviceProperties& 250 const SkDeviceProperties&
251 leakyProperties, 251 leakyProperties,
252 bool enableDistanceFieldFonts) { 252 bool enableDistanceFieldFonts) {
253 if (fGpu->caps()->pathRenderingSupport()) { 253 if (fGpu->caps()->pathRenderingSupport() && renderTarget->getStencilBuffer() &&
254 if (renderTarget->getStencilBuffer() && renderTarget->isMultisampled()) { 254 renderTarget->isMultisampled()) {
255 return SkNEW_ARGS(GrStencilAndCoverTextContext, (this, leakyProperti es)); 255 return GrStencilAndCoverTextContext::Create(this, leakyProperties);
256 } 256 }
257 } 257
258 return SkNEW_ARGS(GrDistanceFieldTextContext, (this, leakyProperties, 258 return GrDistanceFieldTextContext::Create(this, leakyProperties, enableDista nceFieldFonts);
259 enableDistanceFieldFonts));
260 } 259 }
261 260
262 //////////////////////////////////////////////////////////////////////////////// 261 ////////////////////////////////////////////////////////////////////////////////
263 262
264 GrTexture* GrContext::findAndRefTexture(const GrTextureDesc& desc, 263 GrTexture* GrContext::findAndRefTexture(const GrTextureDesc& desc,
265 const GrCacheID& cacheID, 264 const GrCacheID& cacheID,
266 const GrTextureParams* params) { 265 const GrTextureParams* params) {
267 GrResourceKey resourceKey = GrTexturePriv::ComputeKey(fGpu, params, desc, ca cheID); 266 GrResourceKey resourceKey = GrTexturePriv::ComputeKey(fGpu, params, desc, ca cheID);
268 GrGpuResource* resource = fResourceCache->find(resourceKey); 267 GrGpuResource* resource = fResourceCache->find(resourceKey);
269 SkSafeRef(resource); 268 SkSafeRef(resource);
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1862 fResourceCache->printStats(); 1861 fResourceCache->printStats();
1863 } 1862 }
1864 #endif 1863 #endif
1865 1864
1866 #if GR_GPU_STATS 1865 #if GR_GPU_STATS
1867 const GrContext::GPUStats* GrContext::gpuStats() const { 1866 const GrContext::GPUStats* GrContext::gpuStats() const {
1868 return fGpu->gpuStats(); 1867 return fGpu->gpuStats();
1869 } 1868 }
1870 #endif 1869 #endif
1871 1870
OLDNEW
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698