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

Side by Side Diff: src/gpu/effects/GrConfigConversionEffect.cpp

Issue 913693002: Clean up clipping code a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix assert Created 5 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "GrConfigConversionEffect.h" 8 #include "GrConfigConversionEffect.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrInvariantOutput.h" 10 #include "GrInvariantOutput.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 void GrConfigConversionEffect::getGLProcessorKey(const GrGLCaps& caps, 150 void GrConfigConversionEffect::getGLProcessorKey(const GrGLCaps& caps,
151 GrProcessorKeyBuilder* b) const { 151 GrProcessorKeyBuilder* b) const {
152 GrGLConfigConversionEffect::GenKey(*this, caps, b); 152 GrGLConfigConversionEffect::GenKey(*this, caps, b);
153 } 153 }
154 154
155 GrGLFragmentProcessor* GrConfigConversionEffect::createGLInstance() const { 155 GrGLFragmentProcessor* GrConfigConversionEffect::createGLInstance() const {
156 return SkNEW_ARGS(GrGLConfigConversionEffect, (*this)); 156 return SkNEW_ARGS(GrGLConfigConversionEffect, (*this));
157 } 157 }
158 158
159
160
159 void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context , 161 void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context ,
160 PMConversion* pmTo UPMRule, 162 PMConversion* pmTo UPMRule,
161 PMConversion* upmT oPMRule) { 163 PMConversion* upmT oPMRule) {
162 *pmToUPMRule = kNone_PMConversion; 164 *pmToUPMRule = kNone_PMConversion;
163 *upmToPMRule = kNone_PMConversion; 165 *upmToPMRule = kNone_PMConversion;
164 SkAutoTMalloc<uint32_t> data(256 * 256 * 3); 166 SkAutoTMalloc<uint32_t> data(256 * 256 * 3);
165 uint32_t* srcData = data.get(); 167 uint32_t* srcData = data.get();
166 uint32_t* firstRead = data.get() + 256 * 256; 168 uint32_t* firstRead = data.get() + 256 * 256;
167 uint32_t* secondRead = data.get() + 2 * 256 * 256; 169 uint32_t* secondRead = data.get() + 2 * 256 * 256;
168 170
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 kNone_PMConversion != pmConversion) { 280 kNone_PMConversion != pmConversion) {
279 // The PM conversions assume colors are 0..255 281 // The PM conversions assume colors are 0..255
280 return NULL; 282 return NULL;
281 } 283 }
282 return SkNEW_ARGS(GrConfigConversionEffect, (texture, 284 return SkNEW_ARGS(GrConfigConversionEffect, (texture,
283 swapRedAndBlue, 285 swapRedAndBlue,
284 pmConversion, 286 pmConversion,
285 matrix)); 287 matrix));
286 } 288 }
287 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698