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

Unified Diff: cc/trees/layer_tree_host.h

Issue 61823008: Introduce separate client and init path for single-threaded cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index aa057e0ad93fa61aca546c56f5452d392370c4bf..dba4aa617de5928d01f97e6fb87018959f66be60 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -48,8 +48,9 @@ class HeadsUpDisplayLayer;
class Layer;
class LayerTreeHostImpl;
class LayerTreeHostImplClient;
-class PrioritizedResourceManager;
+class LayerTreeHostSingleThreadClient;
class PrioritizedResource;
+class PrioritizedResourceManager;
class Region;
class RenderingStatsInstrumentation;
class ResourceProvider;
@@ -112,11 +113,17 @@ class CC_EXPORT UIResourceRequest {
class CC_EXPORT LayerTreeHost {
public:
// The SharedBitmapManager will be used on the compositor thread.
- static scoped_ptr<LayerTreeHost> Create(
+ static scoped_ptr<LayerTreeHost> CreateThreaded(
LayerTreeHostClient* client,
SharedBitmapManager* manager,
const LayerTreeSettings& settings,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
+
+ static scoped_ptr<LayerTreeHost> CreateSingleThreaded(
+ LayerTreeHostClient* client,
+ LayerTreeHostSingleThreadClient* single_thread_client,
+ SharedBitmapManager* manager,
+ const LayerTreeSettings& settings);
virtual ~LayerTreeHost();
void SetLayerTreeHostClientReady();
@@ -165,9 +172,6 @@ class CC_EXPORT LayerTreeHost {
void Composite(base::TimeTicks frame_begin_time);
- // Only used when compositing on the main thread.
- void ScheduleComposite();
-
// Composites and attempts to read back the result into the provided
// buffer. If it wasn't possible, e.g. due to context lost, will return
// false.
@@ -316,7 +320,10 @@ class CC_EXPORT LayerTreeHost {
LayerTreeHost(LayerTreeHostClient* client,
SharedBitmapManager* manager,
const LayerTreeSettings& settings);
- bool Initialize(scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
+ bool InitializeThreaded(
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
+ bool InitializeSingleThreaded(
+ LayerTreeHostSingleThreadClient* single_thread_client);
bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing);
void SetOutputSurfaceLostForTesting(bool is_lost) {
output_surface_lost_ = is_lost;
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698