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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT 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/gpu/effects/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('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 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 "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 color[0] = SkTMin(x, y); 175 color[0] = SkTMin(x, y);
176 } 176 }
177 } 177 }
178 178
179 GrSurfaceDesc desc; 179 GrSurfaceDesc desc;
180 desc.fFlags = kRenderTarget_GrSurfaceFlag; 180 desc.fFlags = kRenderTarget_GrSurfaceFlag;
181 desc.fWidth = 256; 181 desc.fWidth = 256;
182 desc.fHeight = 256; 182 desc.fHeight = 256;
183 desc.fConfig = kRGBA_8888_GrPixelConfig; 183 desc.fConfig = kRGBA_8888_GrPixelConfig;
184 184
185 SkAutoTUnref<GrTexture> readTex(context->textureProvider()->createTexture(de sc, true, NULL, 0)); 185 SkAutoTUnref<GrTexture> readTex(context->textureProvider()->createTexture(de sc, true, nullptr, 0));
186 if (!readTex.get()) { 186 if (!readTex.get()) {
187 return; 187 return;
188 } 188 }
189 SkAutoTUnref<GrTexture> tempTex(context->textureProvider()->createTexture(de sc, true, NULL, 0)); 189 SkAutoTUnref<GrTexture> tempTex(context->textureProvider()->createTexture(de sc, true, nullptr, 0));
190 if (!tempTex.get()) { 190 if (!tempTex.get()) {
191 return; 191 return;
192 } 192 }
193 desc.fFlags = kNone_GrSurfaceFlags; 193 desc.fFlags = kNone_GrSurfaceFlags;
194 SkAutoTUnref<GrTexture> dataTex(context->textureProvider()->createTexture(de sc, true, data, 0)); 194 SkAutoTUnref<GrTexture> dataTex(context->textureProvider()->createTexture(de sc, true, data, 0));
195 if (!dataTex.get()) { 195 if (!dataTex.get()) {
196 return; 196 return;
197 } 197 }
198 198
199 static const PMConversion kConversionRules[][2] = { 199 static const PMConversion kConversionRules[][2] = {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 if (!swapRedAndBlue && kNone_PMConversion == pmConversion) { 296 if (!swapRedAndBlue && kNone_PMConversion == pmConversion) {
297 // If we returned a GrConfigConversionEffect that was equivalent to a Gr SimpleTextureEffect 297 // If we returned a GrConfigConversionEffect that was equivalent to a Gr SimpleTextureEffect
298 // then we may pollute our texture cache with redundant shaders. So in t he case that no 298 // then we may pollute our texture cache with redundant shaders. So in t he case that no
299 // conversions were requested we instead return a GrSimpleTextureEffect. 299 // conversions were requested we instead return a GrSimpleTextureEffect.
300 return GrSimpleTextureEffect::Create(procDataManager, texture, matrix); 300 return GrSimpleTextureEffect::Create(procDataManager, texture, matrix);
301 } else { 301 } else {
302 if (kRGBA_8888_GrPixelConfig != texture->config() && 302 if (kRGBA_8888_GrPixelConfig != texture->config() &&
303 kBGRA_8888_GrPixelConfig != texture->config() && 303 kBGRA_8888_GrPixelConfig != texture->config() &&
304 kNone_PMConversion != pmConversion) { 304 kNone_PMConversion != pmConversion) {
305 // The PM conversions assume colors are 0..255 305 // The PM conversions assume colors are 0..255
306 return NULL; 306 return nullptr;
307 } 307 }
308 return new GrConfigConversionEffect(procDataManager, texture, swapRedAnd Blue, pmConversion, 308 return new GrConfigConversionEffect(procDataManager, texture, swapRedAnd Blue, pmConversion,
309 matrix); 309 matrix);
310 } 310 }
311 } 311 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698