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

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1148413007: cc: Use max_bytes_per_copy_operation setting to determine one-copy flush interval. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: 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>
« cc/raster/one_copy_tile_task_worker_pool.cc ('K') | « cc/raster/one_copy_tile_task_worker_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698