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

Unified Diff: cc/debug/test_web_graphics_context_3d.cc

Issue 22900018: cc: Set the mapped memory reclaim limit for the renderer compositor on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the unittest Created 7 years, 3 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
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);

Powered by Google App Engine
This is Rietveld 408576698