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

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

Issue 726693002: Use DrawStates ProcOptInfo when creating the Optimized Draw State. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move to pri pri pri private Created 6 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
« no previous file with comments | « no previous file | src/gpu/GrOptDrawState.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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 * Subclasses of GrDrawTarget that actually draw (as opposed to those that j ust buffer for 796 * Subclasses of GrDrawTarget that actually draw (as opposed to those that j ust buffer for
797 * playback) must call this function and respect the flags that replace the output color. 797 * playback) must call this function and respect the flags that replace the output color.
798 * 798 *
799 * If the cached BlendOptFlags does not have the invalidate bit set, then ge tBlendOpts will 799 * If the cached BlendOptFlags does not have the invalidate bit set, then ge tBlendOpts will
800 * simply returned the cached flags and coefficients. Otherwise it will calc ulate the values. 800 * simply returned the cached flags and coefficients. Otherwise it will calc ulate the values.
801 */ 801 */
802 BlendOptFlags getBlendOpts(bool forceCoverage = false, 802 BlendOptFlags getBlendOpts(bool forceCoverage = false,
803 GrBlendCoeff* srcCoeff = NULL, 803 GrBlendCoeff* srcCoeff = NULL,
804 GrBlendCoeff* dstCoeff = NULL) const; 804 GrBlendCoeff* dstCoeff = NULL) const;
805 805
806 const GrProcOptInfo& colorProcInfo() const {
807 this->calcColorInvariantOutput();
808 return fColorProcInfo;
809 }
810
811 const GrProcOptInfo& coverageProcInfo() const {
812 this->calcCoverageInvariantOutput();
813 return fCoverageProcInfo;
814 }
815
806 /** 816 /**
807 * Determines whether src alpha is guaranteed to be one for all src pixels 817 * Determines whether src alpha is guaranteed to be one for all src pixels
808 */ 818 */
809 bool srcAlphaWillBeOne() const; 819 bool srcAlphaWillBeOne() const;
810 820
811 /** 821 /**
812 * If fColorProcInfoValid is false, function calculates the invariant output for the color 822 * If fColorProcInfoValid is false, function calculates the invariant output for the color
813 * stages and results are stored in fColorProcInfo. 823 * stages and results are stored in fColorProcInfo.
814 */ 824 */
815 void calcColorInvariantOutput() const; 825 void calcColorInvariantOutput() const;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 mutable bool fCoverageProcInfoValid; 872 mutable bool fCoverageProcInfoValid;
863 873
864 friend class GrOptDrawState; 874 friend class GrOptDrawState;
865 875
866 typedef SkRefCnt INHERITED; 876 typedef SkRefCnt INHERITED;
867 }; 877 };
868 878
869 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags); 879 GR_MAKE_BITFIELD_OPS(GrDrawState::BlendOptFlags);
870 880
871 #endif 881 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698