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

Side by Side 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: Properly track the previous patch Created 5 years, 8 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 fDstReadInShaderSupport = false; 1072 fDstReadInShaderSupport = false;
1073 fDiscardRenderTargetSupport = false; 1073 fDiscardRenderTargetSupport = false;
1074 fReuseScratchTextures = true; 1074 fReuseScratchTextures = true;
1075 fGpuTracingSupport = false; 1075 fGpuTracingSupport = false;
1076 fCompressedTexSubImageSupport = false; 1076 fCompressedTexSubImageSupport = false;
1077 fOversizedStencilSupport = false; 1077 fOversizedStencilSupport = false;
1078 fTextureBarrierSupport = false; 1078 fTextureBarrierSupport = false;
1079 1079
1080 fUseDrawInsteadOfClear = false; 1080 fUseDrawInsteadOfClear = false;
1081 1081
1082 fBlendEquationSupport = kBasic_BlendEquationSupport;
1082 fMapBufferFlags = kNone_MapFlags; 1083 fMapBufferFlags = kNone_MapFlags;
1083 1084
1084 fMaxRenderTargetSize = 0; 1085 fMaxRenderTargetSize = 0;
1085 fMaxTextureSize = 0; 1086 fMaxTextureSize = 0;
1086 fMaxSampleCount = 0; 1087 fMaxSampleCount = 0;
1087 1088
1088 fShaderPrecisionVaries = false; 1089 fShaderPrecisionVaries = false;
1089 1090
1090 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 1091 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
1091 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); 1092 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
(...skipping 11 matching lines...) Expand all
1103 fDstReadInShaderSupport = other.fDstReadInShaderSupport; 1104 fDstReadInShaderSupport = other.fDstReadInShaderSupport;
1104 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport; 1105 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport;
1105 fReuseScratchTextures = other.fReuseScratchTextures; 1106 fReuseScratchTextures = other.fReuseScratchTextures;
1106 fGpuTracingSupport = other.fGpuTracingSupport; 1107 fGpuTracingSupport = other.fGpuTracingSupport;
1107 fCompressedTexSubImageSupport = other.fCompressedTexSubImageSupport; 1108 fCompressedTexSubImageSupport = other.fCompressedTexSubImageSupport;
1108 fOversizedStencilSupport = other.fOversizedStencilSupport; 1109 fOversizedStencilSupport = other.fOversizedStencilSupport;
1109 fTextureBarrierSupport = other.fTextureBarrierSupport; 1110 fTextureBarrierSupport = other.fTextureBarrierSupport;
1110 1111
1111 fUseDrawInsteadOfClear = other.fUseDrawInsteadOfClear; 1112 fUseDrawInsteadOfClear = other.fUseDrawInsteadOfClear;
1112 1113
1114 fBlendEquationSupport = other.fBlendEquationSupport;
1113 fMapBufferFlags = other.fMapBufferFlags; 1115 fMapBufferFlags = other.fMapBufferFlags;
1114 1116
1115 fMaxRenderTargetSize = other.fMaxRenderTargetSize; 1117 fMaxRenderTargetSize = other.fMaxRenderTargetSize;
1116 fMaxTextureSize = other.fMaxTextureSize; 1118 fMaxTextureSize = other.fMaxTextureSize;
1117 fMaxSampleCount = other.fMaxSampleCount; 1119 fMaxSampleCount = other.fMaxSampleCount;
1118 1120
1119 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende rSupport)); 1121 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende rSupport));
1120 memcpy(fConfigTextureSupport, other.fConfigTextureSupport, sizeof(fConfigTex tureSupport)); 1122 memcpy(fConfigTextureSupport, other.fConfigTextureSupport, sizeof(fConfigTex tureSupport));
1121 1123
1122 fShaderPrecisionVaries = other.fShaderPrecisionVaries; 1124 fShaderPrecisionVaries = other.fShaderPrecisionVaries;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]); 1191 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]);
1190 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]); 1192 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]);
1191 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]); 1193 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]);
1192 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]); 1194 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]);
1193 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]); 1195 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]);
1194 1196
1195 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); 1197 r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
1196 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ; 1198 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ;
1197 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); 1199 r.appendf("Max Sample Count : %d\n", fMaxSampleCount);
1198 1200
1201 static const char* kBlendEquationSupportNames[] = {
1202 "Basic",
1203 "Advanced",
1204 "Advanced Coherent",
1205 };
1206 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport);
1207 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport);
1208 GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport);
1209 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEq uationSupport + 1);
1210
1211 r.appendf("Blend Equation Support : %s\n",
1212 kBlendEquationSupportNames[fBlendEquationSupport]);
1199 r.appendf("Map Buffer Support : %s\n", 1213 r.appendf("Map Buffer Support : %s\n",
1200 map_flags_to_string(fMapBufferFlags).c_str()); 1214 map_flags_to_string(fMapBufferFlags).c_str());
1201 1215
1202 static const char* kConfigNames[] = { 1216 static const char* kConfigNames[] = {
1203 "Unknown", // kUnknown_GrPixelConfig 1217 "Unknown", // kUnknown_GrPixelConfig
1204 "Alpha8", // kAlpha_8_GrPixelConfig, 1218 "Alpha8", // kAlpha_8_GrPixelConfig,
1205 "Index8", // kIndex_8_GrPixelConfig, 1219 "Index8", // kIndex_8_GrPixelConfig,
1206 "RGB565", // kRGB_565_GrPixelConfig, 1220 "RGB565", // kRGB_565_GrPixelConfig,
1207 "RGBA444", // kRGBA_4444_GrPixelConfig, 1221 "RGBA444", // kRGBA_4444_GrPixelConfig,
1208 "RGBA8888", // kRGBA_8888_GrPixelConfig, 1222 "RGBA8888", // kRGBA_8888_GrPixelConfig,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp, 1289 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp,
1276 GrPipelineBuilder::AutoRestoreStencil* ars, 1290 GrPipelineBuilder::AutoRestoreStencil* ars,
1277 GrScissorState* scissorState, 1291 GrScissorState* scissorState,
1278 const SkRect* devBounds) { 1292 const SkRect* devBounds) {
1279 return fClipMaskManager.setupClipping(pipelineBuilder, 1293 return fClipMaskManager.setupClipping(pipelineBuilder,
1280 arfp, 1294 arfp,
1281 ars, 1295 ars,
1282 scissorState, 1296 scissorState,
1283 devBounds); 1297 devBounds);
1284 } 1298 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698