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

Side by Side Diff: src/gpu/effects/GrConstColorProcessor.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/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.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 2015 Google Inc. 2 * Copyright 2015 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 "effects/GrConstColorProcessor.h" 8 #include "effects/GrConstColorProcessor.h"
9 #include "gl/GrGLProcessor.h" 9 #include "gl/GrGLProcessor.h"
10 #include "gl/GrGLSL.h" 10 #include "gl/GrGLSL.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 const GrConstColorProcessor& that = other.cast<GrConstColorProcessor>(); 100 const GrConstColorProcessor& that = other.cast<GrConstColorProcessor>();
101 return fMode == that.fMode && fColor == that.fColor; 101 return fMode == that.fMode && fColor == that.fColor;
102 } 102 }
103 103
104 /////////////////////////////////////////////////////////////////////////////// 104 ///////////////////////////////////////////////////////////////////////////////
105 105
106 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConstColorProcessor); 106 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConstColorProcessor);
107 107
108 GrFragmentProcessor* GrConstColorProcessor::TestCreate(SkRandom* random, 108 GrFragmentProcessor* GrConstColorProcessor::TestCreate(SkRandom* random,
109 GrContext*, 109 GrContext*,
110 const GrDrawTargetCaps&, 110 const GrCaps&,
111 GrTexture*[]) { 111 GrTexture*[]) {
112 GrColor color; 112 GrColor color;
113 int colorPicker = random->nextULessThan(3); 113 int colorPicker = random->nextULessThan(3);
114 switch (colorPicker) { 114 switch (colorPicker) {
115 case 0: { 115 case 0: {
116 uint32_t a = random->nextULessThan(0x100); 116 uint32_t a = random->nextULessThan(0x100);
117 uint32_t r = random->nextULessThan(a+1); 117 uint32_t r = random->nextULessThan(a+1);
118 uint32_t g = random->nextULessThan(a+1); 118 uint32_t g = random->nextULessThan(a+1);
119 uint32_t b = random->nextULessThan(a+1); 119 uint32_t b = random->nextULessThan(a+1);
120 color = GrColorPackRGBA(r, g, b, a); 120 color = GrColorPackRGBA(r, g, b, a);
121 break; 121 break;
122 } 122 }
123 case 1: 123 case 1:
124 color = 0; 124 color = 0;
125 break; 125 break;
126 case 2: 126 case 2:
127 color = random->nextULessThan(0x100); 127 color = random->nextULessThan(0x100);
128 color = color | (color << 8) | (color << 16) | (color << 24); 128 color = color | (color << 8) | (color << 16) | (color << 24);
129 break; 129 break;
130 } 130 }
131 InputMode mode = static_cast<InputMode>(random->nextULessThan(kInputModeCnt) ); 131 InputMode mode = static_cast<InputMode>(random->nextULessThan(kInputModeCnt) );
132 return GrConstColorProcessor::Create(color, mode); 132 return GrConstColorProcessor::Create(color, mode);
133 } 133 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698