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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1037123003: Implement support for KHR_blend_equation_advanced (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_zzz2_barriers
Patch Set: Compiler warning Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrDrawTargetCaps.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 850309797cf7d7e63b502aaaac2757dc4962e5a4..2e9fb74c2b4e0d9a1d7fddbc608e71bf921ed57b 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -653,6 +653,7 @@ void GrDrawTargetCaps::reset() {
fUseDrawInsteadOfClear = false;
+ fBlendEquationSupport = kBasic_BlendEquationSupport;
fMapBufferFlags = kNone_MapFlags;
fMaxRenderTargetSize = 0;
@@ -677,6 +678,7 @@ GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
fUseDrawInsteadOfClear = other.fUseDrawInsteadOfClear;
+ fBlendEquationSupport = other.fBlendEquationSupport;
fMapBufferFlags = other.fMapBufferFlags;
fMaxRenderTargetSize = other.fMaxRenderTargetSize;
@@ -728,6 +730,18 @@ SkString GrDrawTargetCaps::dump() const {
r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
r.appendf("Max Sample Count : %d\n", fMaxSampleCount);
+ static const char* kBlendEquationSupportNames[] = {
+ "Basic",
+ "Advanced",
+ "Advanced Coherent",
+ };
+ GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport);
+ GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport);
+ GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport);
+ GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEquationSupport + 1);
+
+ r.appendf("Blend Equation Support : %s\n",
+ kBlendEquationSupportNames[fBlendEquationSupport]);
r.appendf("Map Buffer Support : %s\n",
map_flags_to_string(fMapBufferFlags).c_str());
« no previous file with comments | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrDrawTargetCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698