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

Unified Diff: cc/output/output_surface.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: Move max_transfer_buffer_usage_bytes to OutputSurface::Capabilities Created 7 years, 4 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/output/output_surface.cc
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index f085d4905932120aeca91b2381237e04ffcc74a3..f75cec9d586f7d75abb0152cede7b27f06f6c4ba 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -31,7 +31,8 @@ using std::vector;
namespace cc {
OutputSurface::OutputSurface(
- scoped_refptr<ContextProvider> context_provider)
+ scoped_refptr<ContextProvider> context_provider,
+ size_t max_transfer_buffer_usage_bytes)
: context_provider_(context_provider),
has_gl_discard_backbuffer_(false),
has_swap_buffers_complete_callback_(false),
@@ -43,10 +44,13 @@ OutputSurface::OutputSurface(
begin_frame_pending_(false),
client_(NULL),
check_for_retroactive_begin_frame_pending_(false) {
+ capabilities_.max_transfer_buffer_usage_bytes =
+ max_transfer_buffer_usage_bytes;
}
OutputSurface::OutputSurface(
- scoped_ptr<cc::SoftwareOutputDevice> software_device)
+ scoped_ptr<cc::SoftwareOutputDevice> software_device,
+ size_t max_transfer_buffer_usage_bytes)
: software_device_(software_device.Pass()),
has_gl_discard_backbuffer_(false),
has_swap_buffers_complete_callback_(false),
@@ -58,11 +62,14 @@ OutputSurface::OutputSurface(
begin_frame_pending_(false),
client_(NULL),
check_for_retroactive_begin_frame_pending_(false) {
+ capabilities_.max_transfer_buffer_usage_bytes =
+ max_transfer_buffer_usage_bytes;
}
OutputSurface::OutputSurface(
scoped_refptr<ContextProvider> context_provider,
- scoped_ptr<cc::SoftwareOutputDevice> software_device)
+ scoped_ptr<cc::SoftwareOutputDevice> software_device,
+ size_t max_transfer_buffer_usage_bytes)
: context_provider_(context_provider),
software_device_(software_device.Pass()),
has_gl_discard_backbuffer_(false),
@@ -75,6 +82,8 @@ OutputSurface::OutputSurface(
begin_frame_pending_(false),
client_(NULL),
check_for_retroactive_begin_frame_pending_(false) {
+ capabilities_.max_transfer_buffer_usage_bytes =
+ max_transfer_buffer_usage_bytes;
}
void OutputSurface::InitializeBeginFrameEmulation(
@@ -407,4 +416,7 @@ void OutputSurface::SetMemoryPolicy(const ManagedMemoryPolicy& policy,
client_->SetDiscardBackBufferWhenNotVisible(discard_backbuffer);
}
+const size_t OutputSurface::kDefaultMaxTransferBufferUsageBytes =
+ std::numeric_limits<size_t>::max();
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698