Index: cc/debug/test_web_graphics_context_3d.cc |
diff --git a/cc/debug/test_web_graphics_context_3d.cc b/cc/debug/test_web_graphics_context_3d.cc |
index 04027aedab161eb8b2ee7c4ab1972c41e2ead9da..1c0d415b97bb841aa6951bcdfcaf142bb0e6a474 100644 |
--- a/cc/debug/test_web_graphics_context_3d.cc |
+++ b/cc/debug/test_web_graphics_context_3d.cc |
@@ -74,7 +74,8 @@ TestWebGraphicsContext3D::TestWebGraphicsContext3D() |
width_(0), |
height_(0), |
bound_buffer_(0), |
- weak_ptr_factory_(this) { |
+ weak_ptr_factory_(this), |
+ transfer_buffer_memory_used_bytes_(0) { |
CreateNamespace(); |
test_capabilities_.swapbuffers_complete_callback = true; |
} |
@@ -485,6 +486,9 @@ void TestWebGraphicsContext3D::bufferData(WebKit::WGC3Denum target, |
buffers.get(bound_buffer_)->pixels.reset(); |
return; |
} |
+ if (target == GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM) |
+ transfer_buffer_memory_used_bytes_ += size; |
reveman
2013/09/06 22:28:27
This is not going to do the right thing if the buf
kaanb
2013/09/07 01:30:31
Done. After this change the number returned by Get
|
+ |
buffers.get(bound_buffer_)->pixels.reset(new uint8[size]); |
if (data != NULL) |
memcpy(buffers.get(bound_buffer_)->pixels.get(), data, size); |