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

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

Issue 425153003: Remove kDisableBlend_BlendOptFlag as it is no longer needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up and fully remove flag Created 6 years, 4 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 | « no previous file | src/gpu/GrDrawState.cpp » ('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 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 enum BlendOptFlags { 514 enum BlendOptFlags {
515 /** 515 /**
516 * No optimization 516 * No optimization
517 */ 517 */
518 kNone_BlendOpt = 0, 518 kNone_BlendOpt = 0,
519 /** 519 /**
520 * Don't draw at all 520 * Don't draw at all
521 */ 521 */
522 kSkipDraw_BlendOptFlag = 0x1, 522 kSkipDraw_BlendOptFlag = 0x1,
523 /** 523 /**
524 * Emit the src color, disable HW blending (replace dst with src)
525 */
526 kDisableBlend_BlendOptFlag = 0x2,
527 /**
528 * The coverage value does not have to be computed separately from alpha , the the output 524 * The coverage value does not have to be computed separately from alpha , the the output
529 * color can be the modulation of the two. 525 * color can be the modulation of the two.
530 */ 526 */
531 kCoverageAsAlpha_BlendOptFlag = 0x4, 527 kCoverageAsAlpha_BlendOptFlag = 0x2,
532 /** 528 /**
533 * Instead of emitting a src color, emit coverage in the alpha channel a nd r,g,b are 529 * Instead of emitting a src color, emit coverage in the alpha channel a nd r,g,b are
534 * "don't cares". 530 * "don't cares".
535 */ 531 */
536 kEmitCoverage_BlendOptFlag = 0x8, 532 kEmitCoverage_BlendOptFlag = 0x4,
537 /** 533 /**
538 * Emit transparent black instead of the src color, no need to compute c overage. 534 * Emit transparent black instead of the src color, no need to compute c overage.
539 */ 535 */
540 kEmitTransBlack_BlendOptFlag = 0x10, 536 kEmitTransBlack_BlendOptFlag = 0x8,
541 /** 537 /**
542 * Flag used to invalidate the cached BlendOptFlags, OptSrcCoeff, and Op tDstCoeff cached by 538 * Flag used to invalidate the cached BlendOptFlags, OptSrcCoeff, and Op tDstCoeff cached by
543 * the get BlendOpts function. 539 * the get BlendOpts function.
544 */ 540 */
545 kInvalid_BlendOptFlag = 0x20, 541 kInvalid_BlendOptFlag = 0x10,
546 }; 542 };
bsalomon 2014/07/30 19:49:30 Why not just make this 1 << 31 so that we never up
egdaniel 2014/07/30 20:06:38 Done but hopefully, fingers crossed, these flags w
547 GR_DECL_BITFIELD_OPS_FRIENDS(BlendOptFlags); 543 GR_DECL_BITFIELD_OPS_FRIENDS(BlendOptFlags);
548 544
549 void invalidateBlendOptFlags() { 545 void invalidateBlendOptFlags() {
550 fBlendOptFlags = kInvalid_BlendOptFlag; 546 fBlendOptFlags = kInvalid_BlendOptFlag;
551 } 547 }
552 548
553 /** 549 /**
554 * We don't use suplied vertex color attributes if our blend mode is EmitCov erage or 550 * We don't use suplied vertex color attributes if our blend mode is EmitCov erage or
555 * EmitTransBlack 551 * EmitTransBlack
556 */ 552 */
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 * @param count the number of attributes being set, limited to kMaxVer texAttribCnt. 1005 * @param count the number of attributes being set, limited to kMaxVer texAttribCnt.
1010 */ 1006 */
1011 void setVertexAttribs(const GrVertexAttrib attribs[], int count); 1007 void setVertexAttribs(const GrVertexAttrib attribs[], int count);
1012 1008
1013 typedef SkRefCnt INHERITED; 1009 typedef SkRefCnt INHERITED;
1014 }; 1010 };
1015 1011
1016 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); 1012 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags);
1017 1013
1018 #endif 1014 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698