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

Unified Diff: src/gpu/gl/GrGLBufferImpl.cpp

Issue 1419203002: Remove mac buffer impl war (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 2 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/gl/GrGLConfig.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLBufferImpl.cpp
diff --git a/src/gpu/gl/GrGLBufferImpl.cpp b/src/gpu/gl/GrGLBufferImpl.cpp
index 52ef946cff6db24db792bf912a0a43c25b497047..975d087b28987d5c7e12cebe96e8fc7596157a32 100644
--- a/src/gpu/gl/GrGLBufferImpl.cpp
+++ b/src/gpu/gl/GrGLBufferImpl.cpp
@@ -195,26 +195,8 @@ bool GrGLBufferImpl::updateData(GrGLGpu* gpu, const void* src, size_t srcSizeInB
// Note that we're cheating on the size here. Currently no methods
// allow a partial update that preserves contents of non-updated
// portions of the buffer (map() does a glBufferData(..size, nullptr..))
- bool doSubData = false;
-#if GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND
- static int N = 0;
- // 128 was chosen experimentally. At 256 a slight hitchiness was noticed
- // when dragging a Chromium window around with a canvas tab backgrounded.
- doSubData = 0 == (N % 128);
- ++N;
-#endif
- if (doSubData) {
- // The workaround is to do a glBufferData followed by glBufferSubData.
- // Chromium's command buffer may turn a glBufferSubData where the size
- // exactly matches the buffer size into a glBufferData. So we tack 1
- // extra byte onto the glBufferData.
- fGLSizeInBytes = srcSizeInBytes + 1;
- GL_CALL(gpu, BufferData(fBufferType, fGLSizeInBytes, nullptr, usage));
- GL_CALL(gpu, BufferSubData(fBufferType, 0, srcSizeInBytes, src));
- } else {
- fGLSizeInBytes = srcSizeInBytes;
- GL_CALL(gpu, BufferData(fBufferType, fGLSizeInBytes, src, usage));
- }
+ fGLSizeInBytes = srcSizeInBytes;
+ GL_CALL(gpu, BufferData(fBufferType, fGLSizeInBytes, src, usage));
#endif
return true;
}
« no previous file with comments | « include/gpu/gl/GrGLConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698