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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 619843002: cc: Make separate interface for BeginFrame ipc from OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index ae85fc7c2a851026f705021e44fc760625ecbcb9..f85d4e7bc00fdcb0475ce77741c52eb5785a6358 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -32,6 +32,7 @@
#include "cc/layers/render_surface.h"
#include "cc/resources/prioritized_resource_manager.h"
#include "cc/resources/ui_resource_request.h"
+#include "cc/scheduler/begin_frame_source.h"
#include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_host_impl.h"
@@ -71,12 +72,15 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
const LayerTreeSettings& settings,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
+ scoped_ptr<BeginFrameSource> external_begin_frame_source) {
DCHECK(main_task_runner.get());
DCHECK(impl_task_runner.get());
scoped_ptr<LayerTreeHost> layer_tree_host(new LayerTreeHost(
client, shared_bitmap_manager, gpu_memory_buffer_manager, settings));
- layer_tree_host->InitializeThreaded(main_task_runner, impl_task_runner);
+ layer_tree_host->InitializeThreaded(main_task_runner,
+ impl_task_runner,
+ external_begin_frame_source.Pass());
return layer_tree_host.Pass();
}
@@ -86,11 +90,13 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded(
SharedBitmapManager* shared_bitmap_manager,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
const LayerTreeSettings& settings,
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner) {
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_ptr<BeginFrameSource> external_begin_frame_source) {
scoped_ptr<LayerTreeHost> layer_tree_host(new LayerTreeHost(
client, shared_bitmap_manager, gpu_memory_buffer_manager, settings));
layer_tree_host->InitializeSingleThreaded(single_thread_client,
- main_task_runner);
+ main_task_runner,
+ external_begin_frame_source.Pass());
return layer_tree_host.Pass();
}
@@ -139,16 +145,23 @@ LayerTreeHost::LayerTreeHost(
void LayerTreeHost::InitializeThreaded(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
- InitializeProxy(
- ThreadProxy::Create(this, main_task_runner, impl_task_runner));
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
+ scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+ InitializeProxy(ThreadProxy::Create(this,
+ main_task_runner,
+ impl_task_runner,
+ external_begin_frame_source.Pass()));
}
void LayerTreeHost::InitializeSingleThreaded(
LayerTreeHostSingleThreadClient* single_thread_client,
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner) {
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_ptr<BeginFrameSource> external_begin_frame_source) {
InitializeProxy(
- SingleThreadProxy::Create(this, single_thread_client, main_task_runner));
+ SingleThreadProxy::Create(this,
+ single_thread_client,
+ main_task_runner,
+ external_begin_frame_source.Pass()));
}
void LayerTreeHost::InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing) {
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698