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

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

Issue 12799005: Use stream usage for dynamic vertex data. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Use stream usage for dynamic vertex data. Created 7 years, 9 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 | « no previous file | 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
===================================================================
--- src/gpu/gl/GrGLBufferImpl.cpp (revision 8124)
+++ src/gpu/gl/GrGLBufferImpl.cpp (working copy)
@@ -16,6 +16,8 @@
#define VALIDATE() do {} while(false)
#endif
robertphillips 2013/03/13 15:20:54 GR_? Comment as to why we even have this #define?
bsalomon 2013/03/13 15:29:22 It's not exposed outside this cpp so I don't think
+#define DYNAMIC_USAGE_PARAM GR_GL_STREAM_DRAW
+
GrGLBufferImpl::GrGLBufferImpl(GrGpuGL* gpu, const Desc& desc, GrGLenum bufferType)
: fDesc(desc)
, fBufferType(bufferType)
@@ -76,7 +78,7 @@
GL_CALL(gpu, BufferData(fBufferType,
fDesc.fSizeInBytes,
NULL,
- fDesc.fDynamic ? GR_GL_DYNAMIC_DRAW : GR_GL_STATIC_DRAW));
+ fDesc.fDynamic ? DYNAMIC_USAGE_PARAM : GR_GL_STATIC_DRAW));
GR_GL_CALL_RET(gpu->glInterface(),
fLockPtr,
MapBuffer(fBufferType, GR_GL_WRITE_ONLY));
@@ -111,7 +113,7 @@
return true;
}
this->bind(gpu);
- GrGLenum usage = fDesc.fDynamic ? GR_GL_DYNAMIC_DRAW : GR_GL_STATIC_DRAW;
+ GrGLenum usage = fDesc.fDynamic ? DYNAMIC_USAGE_PARAM : GR_GL_STATIC_DRAW;
#if GR_GL_USE_BUFFER_DATA_NULL_HINT
if (fDesc.fSizeInBytes == srcSizeInBytes) {
« 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