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

Side by Side Diff: src/gpu/GrDrawState.h

Issue 12469003: Fixed a few warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 #ifndef GrDrawState_DEFINED 8 #ifndef GrDrawState_DEFINED
9 #define GrDrawState_DEFINED 9 #define GrDrawState_DEFINED
10 10
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 417
418 GrColor getColorFilterColor() const { return fCommon.fColorFilterColor; } 418 GrColor getColorFilterColor() const { return fCommon.fColorFilterColor; }
419 SkXfermode::Mode getColorFilterMode() const { return fCommon.fColorFilterMod e; } 419 SkXfermode::Mode getColorFilterMode() const { return fCommon.fColorFilterMod e; }
420 420
421 /** 421 /**
422 * Constructor sets the color to be 'color' which is undone by the destructo r. 422 * Constructor sets the color to be 'color' which is undone by the destructo r.
423 */ 423 */
424 class AutoColorRestore : public ::GrNoncopyable { 424 class AutoColorRestore : public ::GrNoncopyable {
425 public: 425 public:
426 AutoColorRestore() : fDrawState(NULL) {} 426 AutoColorRestore() : fDrawState(NULL), fOldColor(0) {}
sugoi 2013/03/05 20:16:45 Added this to remove the warning about "fOldColor"
bsalomon 2013/03/05 20:19:20 I've been avoiding doing this because the warning
427 427
428 AutoColorRestore(GrDrawState* drawState, GrColor color) { 428 AutoColorRestore(GrDrawState* drawState, GrColor color) {
429 fDrawState = NULL; 429 fDrawState = NULL;
430 this->set(drawState, color); 430 this->set(drawState, color);
431 } 431 }
432 432
433 void reset() { 433 void reset() {
434 if (NULL != fDrawState) { 434 if (NULL != fDrawState) {
435 fDrawState->setColor(fOldColor); 435 fDrawState->setColor(fOldColor);
436 fDrawState = NULL; 436 fDrawState = NULL;
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 int fAttribIndices[kAttribIndexCount]; 1370 int fAttribIndices[kAttribIndexCount];
1371 GrVertexAttribArray<kVertexAttribCnt> fVertexAttribs; 1371 GrVertexAttribArray<kVertexAttribCnt> fVertexAttribs;
1372 GrEffectStage fStages[kNumStages]; 1372 GrEffectStage fStages[kNumStages];
1373 1373
1374 typedef GrRefCnt INHERITED; 1374 typedef GrRefCnt INHERITED;
1375 }; 1375 };
1376 1376
1377 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); 1377 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags);
1378 1378
1379 #endif 1379 #endif
OLDNEW
« no previous file with comments | « no previous file | src/ports/SkFontConfigInterface_direct.cpp » ('j') | src/ports/SkFontConfigInterface_direct.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698