When we're not using the NULL buffer data hint update with glBufferData rather than glBufferSubData.

Review URL: http://codereview.appspot.com/5253047/




git-svn-id: http://skia.googlecode.com/svn/trunk@2443 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrBufferAllocPool.cpp b/gpu/src/GrBufferAllocPool.cpp
index 715d4a9..c01192d 100644
--- a/gpu/src/GrBufferAllocPool.cpp
+++ b/gpu/src/GrBufferAllocPool.cpp
@@ -169,10 +169,13 @@
         }
     }
 
-    // We could honor the space request using updateSubData on the current VB
-    // (if there is room). But we don't currently use draw calls to GL that
+    // We could honor the space request using by a partial update of the current
+    // VB (if there is room). But we don't currently use draw calls to GL that
     // allow the driver to know that previously issued draws won't read from
-    // the part of the buffer we update.
+    // the part of the buffer we update. Also, the GL buffer implementation
+    // may be cheating on the actual buffer size by shrinking the buffer on
+    // updateData() if the amount of data passed is less than the full buffer
+    // size.
     
     if (!createBlock(size)) {
         return NULL;