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

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

Issue 430493003: Revert of Remove gpu support for willUseHWAALines. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/gpu/GrContext.cpp ('k') | 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 /**
524 * The coverage value does not have to be computed separately from alpha , the the output 528 * The coverage value does not have to be computed separately from alpha , the the output
525 * color can be the modulation of the two. 529 * color can be the modulation of the two.
526 */ 530 */
527 kCoverageAsAlpha_BlendOptFlag = 0x2, 531 kCoverageAsAlpha_BlendOptFlag = 0x4,
528 /** 532 /**
529 * Instead of emitting a src color, emit coverage in the alpha channel a nd r,g,b are 533 * Instead of emitting a src color, emit coverage in the alpha channel a nd r,g,b are
530 * "don't cares". 534 * "don't cares".
531 */ 535 */
532 kEmitCoverage_BlendOptFlag = 0x4, 536 kEmitCoverage_BlendOptFlag = 0x8,
533 /** 537 /**
534 * Emit transparent black instead of the src color, no need to compute c overage. 538 * Emit transparent black instead of the src color, no need to compute c overage.
535 */ 539 */
536 kEmitTransBlack_BlendOptFlag = 0x8, 540 kEmitTransBlack_BlendOptFlag = 0x10,
537 /** 541 /**
538 * Flag used to invalidate the cached BlendOptFlags, OptSrcCoeff, and Op tDstCoeff cached by 542 * Flag used to invalidate the cached BlendOptFlags, OptSrcCoeff, and Op tDstCoeff cached by
539 * the get BlendOpts function. 543 * the get BlendOpts function.
540 */ 544 */
541 kInvalid_BlendOptFlag = 0x10, 545 kInvalid_BlendOptFlag = 0x20,
542 }; 546 };
543 GR_DECL_BITFIELD_OPS_FRIENDS(BlendOptFlags); 547 GR_DECL_BITFIELD_OPS_FRIENDS(BlendOptFlags);
544 548
545 void invalidateBlendOptFlags() { 549 void invalidateBlendOptFlags() {
546 fBlendOptFlags = kInvalid_BlendOptFlag; 550 fBlendOptFlags = kInvalid_BlendOptFlag;
547 } 551 }
548 552
549 /** 553 /**
550 * We don't use suplied vertex color attributes if our blend mode is EmitCov erage or 554 * We don't use suplied vertex color attributes if our blend mode is EmitCov erage or
551 * EmitTransBlack 555 * EmitTransBlack
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 * @param count the number of attributes being set, limited to kMaxVer texAttribCnt. 1009 * @param count the number of attributes being set, limited to kMaxVer texAttribCnt.
1006 */ 1010 */
1007 void setVertexAttribs(const GrVertexAttrib attribs[], int count); 1011 void setVertexAttribs(const GrVertexAttrib attribs[], int count);
1008 1012
1009 typedef SkRefCnt INHERITED; 1013 typedef SkRefCnt INHERITED;
1010 }; 1014 };
1011 1015
1012 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); 1016 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags);
1013 1017
1014 #endif 1018 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698