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

Unified Diff: cc/output/output_surface.h

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
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698