Chromium Code Reviews| Index: cc/output/output_surface.h |
| diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h |
| index a94d41efd7370896c3130ecd42ee160e3e86a545..61c5d701cb22374a8375cfea1bb8fc42293eebc7 100644 |
| --- a/cc/output/output_surface.h |
| +++ b/cc/output/output_surface.h |
| @@ -5,6 +5,8 @@ |
| #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_ |
| #define CC_OUTPUT_OUTPUT_SURFACE_H_ |
| +#include <limits> |
| + |
| #include "base/basictypes.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| @@ -44,12 +46,15 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
| DEFAULT_MAX_FRAMES_PENDING = 2 |
| }; |
| - explicit OutputSurface(scoped_refptr<ContextProvider> context_provider); |
| + OutputSurface(scoped_refptr<ContextProvider> context_provider, |
| + size_t max_transfer_buffer_usage_bytes); |
|
danakj
2013/08/27 16:55:39
Since there is only one subclass of this class tha
|
| - explicit OutputSurface(scoped_ptr<cc::SoftwareOutputDevice> software_device); |
| + OutputSurface(scoped_ptr<cc::SoftwareOutputDevice> software_device, |
| + size_t max_transfer_buffer_usage_bytes); |
| 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); |
| virtual ~OutputSurface(); |
| @@ -59,7 +64,8 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
| max_frames_pending(0), |
| deferred_gl_initialization(false), |
| draw_and_swap_full_viewport_every_frame(false), |
| - adjust_deadline_for_parent(true) {} |
| + adjust_deadline_for_parent(true), |
| + max_transfer_buffer_usage_bytes(std::numeric_limits<size_t>::max()) {} |
|
danakj
2013/08/27 16:55:39
why not kDefault...?
|
| bool delegated_rendering; |
| int max_frames_pending; |
| bool deferred_gl_initialization; |
| @@ -67,6 +73,7 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
| // This doesn't handle the <webview> case, but once BeginFrame is |
| // supported natively, we shouldn't need adjust_deadline_for_parent. |
| bool adjust_deadline_for_parent; |
| + size_t max_transfer_buffer_usage_bytes; |
| }; |
| const Capabilities& capabilities() const { |
| @@ -126,6 +133,8 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
| bool HasClient() { return !!client_; } |
| + static const size_t kDefaultMaxTransferBufferUsageBytes; |
| + |
| protected: |
| // Synchronously initialize context3d and enter hardware mode. |
| // This can only supported in threaded compositing mode. |