Index: content/renderer/gpu/render_widget_compositor.cc |
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc |
index 487613598b5959945b99c3b821b15f107910a7f7..159fcc6dd4cc935f90a8de87ae65233d2f9e699e 100644 |
--- a/content/renderer/gpu/render_widget_compositor.cc |
+++ b/content/renderer/gpu/render_widget_compositor.cc |
@@ -178,6 +178,11 @@ gfx::Size CalculateDefaultTileSize(RenderWidget* widget) { |
return gfx::Size(default_tile_size, default_tile_size); |
} |
+size_t GetMaxBytesPerCopyOperation() { |
vmpstr
2015/06/01 18:35:52
Leave a comment here explaining the rationale for
vmpstr
2015/06/02 23:23:27
Can you also make this int?
reveman
2015/06/04 01:19:51
Done.
|
+ const size_t kMegabyte = 1024 * 1024; |
+ return kMegabyte * 4; |
+} |
+ |
// Check cc::TopControlsState, and blink::WebTopControlsState |
// are kept in sync. |
static_assert(int(blink::WebTopControlsBoth) == int(cc::BOTH), |
@@ -458,6 +463,8 @@ void RenderWidgetCompositor::Initialize() { |
settings.use_external_begin_frame_source = false; |
} |
+ settings.max_bytes_per_copy_operation = GetMaxBytesPerCopyOperation(); |
+ |
scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner = |
compositor_deps_->GetCompositorImplThreadTaskRunner(); |
scoped_refptr<base::SingleThreadTaskRunner> |