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

Side by Side Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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/gl/angle/SkANGLEGLContext.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.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 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 "GrGLFragmentShaderBuilder.h" 8 #include "GrGLFragmentShaderBuilder.h"
9 #include "GrGLShaderStringBuilder.h" 9 #include "GrGLShaderStringBuilder.h"
10 #include "GrGLProgramBuilder.h" 10 #include "GrGLProgramBuilder.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 } 42 }
43 } 43 }
44 44
45 GrGLFragmentShaderBuilder::DstReadKey GrGLFragmentShaderBuilder::KeyForDstRead( 45 GrGLFragmentShaderBuilder::DstReadKey GrGLFragmentShaderBuilder::KeyForDstRead(
46 const GrTexture* dstCopy, const GrGLCaps& caps) { 46 const GrTexture* dstCopy, const GrGLCaps& caps) {
47 uint32_t key = kYesDstRead_DstReadKeyBit; 47 uint32_t key = kYesDstRead_DstReadKeyBit;
48 if (caps.fbFetchSupport()) { 48 if (caps.fbFetchSupport()) {
49 return key; 49 return key;
50 } 50 }
51 SkASSERT(NULL != dstCopy); 51 SkASSERT(dstCopy);
52 if (!caps.textureSwizzleSupport() && GrPixelConfigIsAlphaOnly(dstCopy->confi g())) { 52 if (!caps.textureSwizzleSupport() && GrPixelConfigIsAlphaOnly(dstCopy->confi g())) {
53 // The fact that the config is alpha-only must be considered when genera ting code. 53 // The fact that the config is alpha-only must be considered when genera ting code.
54 key |= kUseAlphaConfig_DstReadKeyBit; 54 key |= kUseAlphaConfig_DstReadKeyBit;
55 } 55 }
56 if (kTopLeft_GrSurfaceOrigin == dstCopy->origin()) { 56 if (kTopLeft_GrSurfaceOrigin == dstCopy->origin()) {
57 key |= kTopLeftOrigin_DstReadKeyBit; 57 key |= kTopLeftOrigin_DstReadKeyBit;
58 } 58 }
59 SkASSERT(static_cast<DstReadKey>(key) == key); 59 SkASSERT(static_cast<DstReadKey>(key) == key);
60 return static_cast<DstReadKey>(key); 60 return static_cast<DstReadKey>(key);
61 } 61 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 dual_source_output_name()); 343 dual_source_output_name());
344 fHasSecondaryOutput = true; 344 fHasSecondaryOutput = true;
345 } 345 }
346 return dual_source_output_name(); 346 return dual_source_output_name();
347 } 347 }
348 348
349 const char* GrGLFragmentShaderBuilder::getColorOutputName() const { 349 const char* GrGLFragmentShaderBuilder::getColorOutputName() const {
350 return fHasCustomColorOutput ? declared_color_output_name() : "gl_FragColor" ; 350 return fHasCustomColorOutput ? declared_color_output_name() : "gl_FragColor" ;
351 } 351 }
352 352
OLDNEW
« no previous file with comments | « src/gpu/gl/angle/SkANGLEGLContext.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698