OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |