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

Side by Side Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 47513017: More Windows 64b compilation warning fixes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove common_variables.gypi from CL (ooops) Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "GrGLProgramDesc.h" 8 #include "GrGLProgramDesc.h"
9 #include "GrBackendEffectFactory.h" 9 #include "GrBackendEffectFactory.h"
10 #include "GrDrawEffect.h" 10 #include "GrDrawEffect.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 (skipCoverage ? 0 : (drawState.numCoverageStages() - firstE ffectiveCoverageStage)); 98 (skipCoverage ? 0 : (drawState.numCoverageStages() - firstE ffectiveCoverageStage));
99 99
100 size_t newKeyLength = KeyLength(numEffects); 100 size_t newKeyLength = KeyLength(numEffects);
101 bool allocChanged; 101 bool allocChanged;
102 desc->fKey.reset(newKeyLength, SkAutoMalloc::kAlloc_OnShrink, &allocChanged) ; 102 desc->fKey.reset(newKeyLength, SkAutoMalloc::kAlloc_OnShrink, &allocChanged) ;
103 if (allocChanged || !desc->fInitialized) { 103 if (allocChanged || !desc->fInitialized) {
104 // make sure any padding in the header is zero if we we haven't used thi s allocation before. 104 // make sure any padding in the header is zero if we we haven't used thi s allocation before.
105 memset(desc->header(), 0, kHeaderSize); 105 memset(desc->header(), 0, kHeaderSize);
106 } 106 }
107 // write the key length 107 // write the key length
108 *desc->atOffset<uint32_t, kLengthOffset>() = newKeyLength; 108 *desc->atOffset<uint32_t, kLengthOffset>() = static_cast<uint32_t>(newKeyLen gth);
bsalomon 2013/10/29 14:40:36 SkToU32 adds an assert in debug
robertphillips 2013/11/18 20:22:41 Done.
109 109
110 KeyHeader* header = desc->header(); 110 KeyHeader* header = desc->header();
111 EffectKey* effectKeys = desc->effectKeys(); 111 EffectKey* effectKeys = desc->effectKeys();
112 112
113 int currEffectKey = 0; 113 int currEffectKey = 0;
114 bool readsDst = false; 114 bool readsDst = false;
115 bool readFragPosition = false; 115 bool readFragPosition = false;
116 bool hasVertexCode = false; 116 bool hasVertexCode = false;
117 if (!skipColor) { 117 if (!skipColor) {
118 for (int s = firstEffectiveColorStage; s < drawState.numColorStages(); + +s) { 118 for (int s = firstEffectiveColorStage; s < drawState.numColorStages(); + +s) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) { 281 GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) {
282 fInitialized = other.fInitialized; 282 fInitialized = other.fInitialized;
283 if (fInitialized) { 283 if (fInitialized) {
284 size_t keyLength = other.keyLength(); 284 size_t keyLength = other.keyLength();
285 fKey.reset(keyLength); 285 fKey.reset(keyLength);
286 memcpy(fKey.get(), other.fKey.get(), keyLength); 286 memcpy(fKey.get(), other.fKey.get(), keyLength);
287 } 287 }
288 return *this; 288 return *this;
289 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698