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

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

Issue 643743003: Create helper functions to use in computeInvariantOutput calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update blurMaskFilter 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/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorFilters.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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 bool GrColorProfileEffect::onIsEqual(const GrProcessor& sBase) const { 257 bool GrColorProfileEffect::onIsEqual(const GrProcessor& sBase) const {
258 const GrColorProfileEffect& s = sBase.cast<GrColorProfileEffect>(); 258 const GrColorProfileEffect& s = sBase.cast<GrColorProfileEffect>();
259 return fColorCubeAccess.getTexture() == s.fColorCubeAccess.getTexture(); 259 return fColorCubeAccess.getTexture() == s.fColorCubeAccess.getTexture();
260 } 260 }
261 261
262 const GrBackendFragmentProcessorFactory& GrColorProfileEffect::getFactory() cons t { 262 const GrBackendFragmentProcessorFactory& GrColorProfileEffect::getFactory() cons t {
263 return GrTBackendFragmentProcessorFactory<GrColorProfileEffect>::getInstance (); 263 return GrTBackendFragmentProcessorFactory<GrColorProfileEffect>::getInstance ();
264 } 264 }
265 265
266 void GrColorProfileEffect::onComputeInvariantOutput(InvariantOutput* inout) cons t { 266 void GrColorProfileEffect::onComputeInvariantOutput(InvariantOutput* inout) cons t {
267 inout->fValidFlags = 0; 267 inout->setToUnknown();
268 inout->fIsSingleComponent = false;
269 } 268 }
270 269
271 /////////////////////////////////////////////////////////////////////////////// 270 ///////////////////////////////////////////////////////////////////////////////
272 271
273 GrColorProfileEffect::GLProcessor::GLProcessor(const GrBackendProcessorFactory& factory, 272 GrColorProfileEffect::GLProcessor::GLProcessor(const GrBackendProcessorFactory& factory,
274 const GrProcessor&) 273 const GrProcessor&)
275 : INHERITED(factory) { 274 : INHERITED(factory) {
276 } 275 }
277 276
278 GrColorProfileEffect::GLProcessor::~GLProcessor() { 277 GrColorProfileEffect::GLProcessor::~GLProcessor() {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 static_cast<GrTexture*>(context->findAndRefCachedResource( 365 static_cast<GrTexture*>(context->findAndRefCachedResource(
367 GrTexturePriv::ComputeKey(context->getGpu(), NULL, desc, cacheID)))) ; 366 GrTexturePriv::ComputeKey(context->getGpu(), NULL, desc, cacheID)))) ;
368 367
369 if (!textureCube) { 368 if (!textureCube) {
370 textureCube.reset(context->createTexture(NULL, desc, cacheID, fCubeData- >data(), 0)); 369 textureCube.reset(context->createTexture(NULL, desc, cacheID, fCubeData- >data(), 0));
371 } 370 }
372 371
373 return textureCube ? GrColorProfileEffect::Create(textureCube) : NULL; 372 return textureCube ? GrColorProfileEffect::Create(textureCube) : NULL;
374 } 373 }
375 #endif 374 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698