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

Side by Side Diff: src/gpu/GrCaps.cpp

Issue 1300123002: Use calloc to allocate data that will be uploaded to vertex/index buffers in Chrome (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 5 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/GrBufferAllocPool.cpp ('k') | src/gpu/gl/GrGLBufferImpl.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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 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 "GrCaps.h" 9 #include "GrCaps.h"
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 fStencilWrapOpsSupport = false; 86 fStencilWrapOpsSupport = false;
87 fDiscardRenderTargetSupport = false; 87 fDiscardRenderTargetSupport = false;
88 fReuseScratchTextures = true; 88 fReuseScratchTextures = true;
89 fReuseScratchBuffers = true; 89 fReuseScratchBuffers = true;
90 fGpuTracingSupport = false; 90 fGpuTracingSupport = false;
91 fCompressedTexSubImageSupport = false; 91 fCompressedTexSubImageSupport = false;
92 fOversizedStencilSupport = false; 92 fOversizedStencilSupport = false;
93 fTextureBarrierSupport = false; 93 fTextureBarrierSupport = false;
94 fSupportsInstancedDraws = false; 94 fSupportsInstancedDraws = false;
95 fFullClearIsFree = false; 95 fFullClearIsFree = false;
96 fMustClearUploadedBufferData = false;
96 97
97 fUseDrawInsteadOfClear = false; 98 fUseDrawInsteadOfClear = false;
98 99
99 fBlendEquationSupport = kBasic_BlendEquationSupport; 100 fBlendEquationSupport = kBasic_BlendEquationSupport;
100 fAdvBlendEqBlacklist = 0; 101 fAdvBlendEqBlacklist = 0;
101 102
102 fMapBufferFlags = kNone_MapFlags; 103 fMapBufferFlags = kNone_MapFlags;
103 104
104 fMaxRenderTargetSize = 0; 105 fMaxRenderTargetSize = 0;
105 fMaxTextureSize = 0; 106 fMaxTextureSize = 0;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu pport]); 150 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu pport]);
150 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar getSupport]); 151 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar getSupport]);
151 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText ures]); 152 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText ures]);
152 r.appendf("Reuse Scratch Buffers : %s\n", gNY[fReuseScratchBuff ers]); 153 r.appendf("Reuse Scratch Buffers : %s\n", gNY[fReuseScratchBuff ers]);
153 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]); 154 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]);
154 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]); 155 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]);
155 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]); 156 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]);
156 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]); 157 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]);
157 r.appendf("Supports instanced draws : %s\n", gNY[fSupportsInstance dDraws]); 158 r.appendf("Supports instanced draws : %s\n", gNY[fSupportsInstance dDraws]);
158 r.appendf("Full screen clear is free : %s\n", gNY[fFullClearIsFree] ); 159 r.appendf("Full screen clear is free : %s\n", gNY[fFullClearIsFree] );
160 r.appendf("Must clear buffer memory : %s\n", gNY[fMustClearUploade dBufferData]);
159 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]); 161 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]);
160 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n", 162 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n",
161 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]); 163 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]);
162 if (this->advancedBlendEquationSupport()) { 164 if (this->advancedBlendEquationSupport()) {
163 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist); 165 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist);
164 } 166 }
165 167
166 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); 168 r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
167 r.appendf("Min Texture Size : %d\n", fMinTextureSize); 169 r.appendf("Min Texture Size : %d\n", fMinTextureSize);
168 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ; 170 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 232 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
231 233
232 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 234 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
233 r.appendf("%s is uploadable to a texture: %s\n", 235 r.appendf("%s is uploadable to a texture: %s\n",
234 kConfigNames[i], 236 kConfigNames[i],
235 gNY[fConfigTextureSupport[i]]); 237 gNY[fConfigTextureSupport[i]]);
236 } 238 }
237 239
238 return r; 240 return r;
239 } 241 }
OLDNEW
« no previous file with comments | « src/gpu/GrBufferAllocPool.cpp ('k') | src/gpu/gl/GrGLBufferImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698