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

Side by Side Diff: src/effects/SkColorCubeFilter.cpp

Issue 938943002: Allow GrGpuResources' unique keys to be changed. (Closed) Base URL: https://skia.googlesource.com/skia.git@rename
Patch Set: Address comments Created 5 years, 10 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/effects/SkBlurMaskFilter.cpp ('k') | src/gpu/GrContext.cpp » ('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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 7
8 #include "SkColorCubeFilter.h" 8 #include "SkColorCubeFilter.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkOnce.h" 10 #include "SkOnce.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 GrSurfaceDesc desc; 348 GrSurfaceDesc desc;
349 desc.fWidth = fCache.cubeDimension(); 349 desc.fWidth = fCache.cubeDimension();
350 desc.fHeight = fCache.cubeDimension() * fCache.cubeDimension(); 350 desc.fHeight = fCache.cubeDimension() * fCache.cubeDimension();
351 desc.fConfig = kRGBA_8888_GrPixelConfig; 351 desc.fConfig = kRGBA_8888_GrPixelConfig;
352 352
353 SkAutoTUnref<GrTexture> textureCube(context->findAndRefCachedTexture(key)); 353 SkAutoTUnref<GrTexture> textureCube(context->findAndRefCachedTexture(key));
354 if (!textureCube) { 354 if (!textureCube) {
355 textureCube.reset(context->createTexture(desc, true, fCubeData->data(), 0)); 355 textureCube.reset(context->createTexture(desc, true, fCubeData->data(), 0));
356 if (textureCube) { 356 if (textureCube) {
357 SkAssertResult(context->addResourceToCache(key, textureCube)); 357 context->addResourceToCache(key, textureCube);
358 } 358 }
359 } 359 }
360 360
361 return textureCube ? GrColorCubeEffect::Create(textureCube) : NULL; 361 return textureCube ? GrColorCubeEffect::Create(textureCube) : NULL;
362 } 362 }
363 #endif 363 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698