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 |