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

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

Issue 1133123009: rename GrDrawTargetCaps to GrCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gypi filename Created 5 years, 7 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/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMagnifierImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkLightingImageFilter.h" 8 #include "SkLightingImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 } 1582 }
1583 1583
1584 GrGLFragmentProcessor* GrDiffuseLightingEffect::createGLInstance() const { 1584 GrGLFragmentProcessor* GrDiffuseLightingEffect::createGLInstance() const {
1585 return SkNEW_ARGS(GrGLDiffuseLightingEffect, (*this)); 1585 return SkNEW_ARGS(GrGLDiffuseLightingEffect, (*this));
1586 } 1586 }
1587 1587
1588 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDiffuseLightingEffect); 1588 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDiffuseLightingEffect);
1589 1589
1590 GrFragmentProcessor* GrDiffuseLightingEffect::TestCreate(SkRandom* random, 1590 GrFragmentProcessor* GrDiffuseLightingEffect::TestCreate(SkRandom* random,
1591 GrContext* context, 1591 GrContext* context,
1592 const GrDrawTargetCaps&, 1592 const GrCaps&,
1593 GrTexture* textures[]) { 1593 GrTexture* textures[]) {
1594 SkScalar surfaceScale = random->nextSScalar1(); 1594 SkScalar surfaceScale = random->nextSScalar1();
1595 SkScalar kd = random->nextUScalar1(); 1595 SkScalar kd = random->nextUScalar1();
1596 SkAutoTUnref<SkLight> light(create_random_light(random)); 1596 SkAutoTUnref<SkLight> light(create_random_light(random));
1597 SkMatrix matrix; 1597 SkMatrix matrix;
1598 for (int i = 0; i < 9; i++) { 1598 for (int i = 0; i < 9; i++) {
1599 matrix[i] = random->nextUScalar1(); 1599 matrix[i] = random->nextUScalar1();
1600 } 1600 }
1601 BoundaryMode mode = static_cast<BoundaryMode>(random->nextU() % kBoundaryMod eCount); 1601 BoundaryMode mode = static_cast<BoundaryMode>(random->nextU() % kBoundaryMod eCount);
1602 return GrDiffuseLightingEffect::Create(textures[GrProcessorUnitTest::kAlphaT extureIdx], 1602 return GrDiffuseLightingEffect::Create(textures[GrProcessorUnitTest::kAlphaT extureIdx],
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 } 1790 }
1791 1791
1792 GrGLFragmentProcessor* GrSpecularLightingEffect::createGLInstance() const { 1792 GrGLFragmentProcessor* GrSpecularLightingEffect::createGLInstance() const {
1793 return SkNEW_ARGS(GrGLSpecularLightingEffect, (*this)); 1793 return SkNEW_ARGS(GrGLSpecularLightingEffect, (*this));
1794 } 1794 }
1795 1795
1796 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSpecularLightingEffect); 1796 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSpecularLightingEffect);
1797 1797
1798 GrFragmentProcessor* GrSpecularLightingEffect::TestCreate(SkRandom* random, 1798 GrFragmentProcessor* GrSpecularLightingEffect::TestCreate(SkRandom* random,
1799 GrContext* context, 1799 GrContext* context,
1800 const GrDrawTargetCaps &, 1800 const GrCaps&,
1801 GrTexture* textures[]) { 1801 GrTexture* textures[]) {
1802 SkScalar surfaceScale = random->nextSScalar1(); 1802 SkScalar surfaceScale = random->nextSScalar1();
1803 SkScalar ks = random->nextUScalar1(); 1803 SkScalar ks = random->nextUScalar1();
1804 SkScalar shininess = random->nextUScalar1(); 1804 SkScalar shininess = random->nextUScalar1();
1805 SkAutoTUnref<SkLight> light(create_random_light(random)); 1805 SkAutoTUnref<SkLight> light(create_random_light(random));
1806 SkMatrix matrix; 1806 SkMatrix matrix;
1807 for (int i = 0; i < 9; i++) { 1807 for (int i = 0; i < 9; i++) {
1808 matrix[i] = random->nextUScalar1(); 1808 matrix[i] = random->nextUScalar1();
1809 } 1809 }
1810 BoundaryMode mode = static_cast<BoundaryMode>(random->nextU() % kBoundaryMod eCount); 1810 BoundaryMode mode = static_cast<BoundaryMode>(random->nextU() % kBoundaryMod eCount);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 1986
1987 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); 1987 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight);
1988 } 1988 }
1989 1989
1990 #endif 1990 #endif
1991 1991
1992 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) 1992 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter)
1993 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) 1993 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter)
1994 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) 1994 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter)
1995 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1995 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698