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

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

Issue 1334293003: Create fragment processor for performing input color blend with child processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 5 years, 3 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/SkArithmeticMode_gpu.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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 SkScalar size = SkIntToScalar(colorCube.colorCubeSize()); 297 SkScalar size = SkIntToScalar(colorCube.colorCubeSize());
298 pdman.set1f(fColorCubeSizeUni, SkScalarToFloat(size)); 298 pdman.set1f(fColorCubeSizeUni, SkScalarToFloat(size));
299 pdman.set1f(fColorCubeInvSizeUni, SkScalarToFloat(SkScalarInvert(size))); 299 pdman.set1f(fColorCubeInvSizeUni, SkScalarToFloat(SkScalarInvert(size)));
300 } 300 }
301 301
302 void GrColorCubeEffect::GLProcessor::GenKey(const GrProcessor& proc, 302 void GrColorCubeEffect::GLProcessor::GenKey(const GrProcessor& proc,
303 const GrGLSLCaps&, GrProcessorKeyBui lder* b) { 303 const GrGLSLCaps&, GrProcessorKeyBui lder* b) {
304 } 304 }
305 305
306 bool SkColorCubeFilter::asFragmentProcessors(GrContext* context, GrProcessorData Manager*, 306 bool SkColorCubeFilter::asFragmentProcessors(GrContext* context, GrProcessorData Manager*,
307 SkTDArray<GrFragmentProcessor*>* ar ray) const { 307 SkTDArray<const GrFragmentProcessor *>* array) const {
308 static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain(); 308 static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain();
309 GrUniqueKey key; 309 GrUniqueKey key;
310 GrUniqueKey::Builder builder(&key, kDomain, 2); 310 GrUniqueKey::Builder builder(&key, kDomain, 2);
311 builder[0] = fUniqueID; 311 builder[0] = fUniqueID;
312 builder[1] = fCache.cubeDimension(); 312 builder[1] = fCache.cubeDimension();
313 builder.finish(); 313 builder.finish();
314 314
315 GrSurfaceDesc desc; 315 GrSurfaceDesc desc;
316 desc.fWidth = fCache.cubeDimension(); 316 desc.fWidth = fCache.cubeDimension();
317 desc.fHeight = fCache.cubeDimension() * fCache.cubeDimension(); 317 desc.fHeight = fCache.cubeDimension() * fCache.cubeDimension();
(...skipping 15 matching lines...) Expand all
333 *array->append() = frag; 333 *array->append() = frag;
334 } else { 334 } else {
335 frag->unref(); 335 frag->unref();
336 SkDEBUGCODE(frag = nullptr;) 336 SkDEBUGCODE(frag = nullptr;)
337 } 337 }
338 return true; 338 return true;
339 } 339 }
340 return false; 340 return false;
341 } 341 }
342 #endif 342 #endif
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698