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

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1211363006: Turn off buffer mapping in Chromium (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | 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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #include "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 10
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 fMapBufferType = kMapBufferRange_MapBufferType; 370 fMapBufferType = kMapBufferRange_MapBufferType;
371 } else if (ctxInfo.hasExtension("GL_OES_mapbuffer")) { 371 } else if (ctxInfo.hasExtension("GL_OES_mapbuffer")) {
372 fMapBufferFlags = kCanMap_MapFlag; 372 fMapBufferFlags = kCanMap_MapFlag;
373 fMapBufferType = kMapBuffer_MapBufferType; 373 fMapBufferType = kMapBuffer_MapBufferType;
374 } 374 }
375 } 375 }
376 376
377 // On many GPUs, map memory is very expensive, so we effectively disable it here by setting the 377 // On many GPUs, map memory is very expensive, so we effectively disable it here by setting the
378 // threshold to the maximum unless the client gives us a hint that map memor y is cheap. 378 // threshold to the maximum unless the client gives us a hint that map memor y is cheap.
379 if (fGeometryBufferMapThreshold < 0) { 379 if (fGeometryBufferMapThreshold < 0) {
380 // We think mapping on Chromium will be cheaper once we know ahead of ti me how much space
381 // we will use for all GrBatchs. Right now we might wind up mapping a la rge buffer and using
382 // a small subset.
383 #if 0
380 fGeometryBufferMapThreshold = kChromium_GrGLDriver == ctxInfo.driver() ? 0 : SK_MaxS32; 384 fGeometryBufferMapThreshold = kChromium_GrGLDriver == ctxInfo.driver() ? 0 : SK_MaxS32;
385 #else
386 fGeometryBufferMapThreshold = SK_MaxS32;
387 #endif
381 } 388 }
382 389
383 if (kGL_GrGLStandard == standard) { 390 if (kGL_GrGLStandard == standard) {
384 SkASSERT(ctxInfo.version() >= GR_GL_VER(2,0) || 391 SkASSERT(ctxInfo.version() >= GR_GL_VER(2,0) ||
385 ctxInfo.hasExtension("GL_ARB_texture_non_power_of_two")); 392 ctxInfo.hasExtension("GL_ARB_texture_non_power_of_two"));
386 fNPOTTextureTileSupport = true; 393 fNPOTTextureTileSupport = true;
387 fMipMapSupport = true; 394 fMipMapSupport = true;
388 } else { 395 } else {
389 // Unextended ES2 supports NPOT textures with clamp_to_edge and non-mip filters only 396 // Unextended ES2 supports NPOT textures with clamp_to_edge and non-mip filters only
390 // ES3 has no limitations. 397 // ES3 has no limitations.
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 1165 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
1159 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = 1166 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] =
1160 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p]; 1167 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p];
1161 } 1168 }
1162 } 1169 }
1163 } 1170 }
1164 1171
1165 1172
1166 1173
1167 1174
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698