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

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 1519293002: Add support for (de)serializing LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added framework for (de)serializing Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 class ResourceProvider; 62 class ResourceProvider;
63 class ResourceUpdateQueue; 63 class ResourceUpdateQueue;
64 class SharedBitmapManager; 64 class SharedBitmapManager;
65 class TaskGraphRunner; 65 class TaskGraphRunner;
66 class TopControlsManager; 66 class TopControlsManager;
67 class UIResourceRequest; 67 class UIResourceRequest;
68 struct PendingPageScaleAnimation; 68 struct PendingPageScaleAnimation;
69 struct RenderingStats; 69 struct RenderingStats;
70 struct ScrollAndScaleSet; 70 struct ScrollAndScaleSet;
71 71
72 namespace proto {
73 class LayerTreeHost;
74 }
75
72 class CC_EXPORT LayerTreeHost : public MutatorHostClient { 76 class CC_EXPORT LayerTreeHost : public MutatorHostClient {
73 public: 77 public:
74 // TODO(sad): InitParams should be a movable type so that it can be 78 // TODO(sad): InitParams should be a movable type so that it can be
75 // std::move()d to the Create* functions. 79 // std::move()d to the Create* functions.
76 struct CC_EXPORT InitParams { 80 struct CC_EXPORT InitParams {
77 LayerTreeHostClient* client = nullptr; 81 LayerTreeHostClient* client = nullptr;
78 SharedBitmapManager* shared_bitmap_manager = nullptr; 82 SharedBitmapManager* shared_bitmap_manager = nullptr;
79 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager = nullptr; 83 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager = nullptr;
80 TaskGraphRunner* task_graph_runner = nullptr; 84 TaskGraphRunner* task_graph_runner = nullptr;
81 LayerTreeSettings const* settings = nullptr; 85 LayerTreeSettings const* settings = nullptr;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 bool HasOnlyTranslationTransforms(const Layer* layer) const; 360 bool HasOnlyTranslationTransforms(const Layer* layer) const;
357 bool MaximumTargetScale(const Layer* layer, float* max_scale) const; 361 bool MaximumTargetScale(const Layer* layer, float* max_scale) const;
358 bool AnimationStartScale(const Layer* layer, float* start_scale) const; 362 bool AnimationStartScale(const Layer* layer, float* start_scale) const;
359 bool HasAnyAnimationTargetingProperty( 363 bool HasAnyAnimationTargetingProperty(
360 const Layer* layer, 364 const Layer* layer,
361 Animation::TargetProperty property) const; 365 Animation::TargetProperty property) const;
362 bool AnimationsPreserveAxisAlignment(const Layer* layer) const; 366 bool AnimationsPreserveAxisAlignment(const Layer* layer) const;
363 bool HasAnyAnimation(const Layer* layer) const; 367 bool HasAnyAnimation(const Layer* layer) const;
364 bool HasActiveAnimation(const Layer* layer) const; 368 bool HasActiveAnimation(const Layer* layer) const;
365 369
370 void ToProtobufForCommit(proto::LayerTreeHost* proto) const;
371 void FromProtobufForCommit(const proto::LayerTreeHost& proto);
372
366 protected: 373 protected:
367 LayerTreeHost(InitParams* params, CompositorMode mode); 374 LayerTreeHost(InitParams* params, CompositorMode mode);
368 void InitializeThreaded( 375 void InitializeThreaded(
369 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 376 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
370 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 377 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
371 scoped_ptr<BeginFrameSource> external_begin_frame_source); 378 scoped_ptr<BeginFrameSource> external_begin_frame_source);
372 void InitializeSingleThreaded( 379 void InitializeSingleThreaded(
373 LayerTreeHostSingleThreadClient* single_thread_client, 380 LayerTreeHostSingleThreadClient* single_thread_client,
374 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 381 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
375 scoped_ptr<BeginFrameSource> external_begin_frame_source); 382 scoped_ptr<BeginFrameSource> external_begin_frame_source);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 520
514 uint32_t surface_id_namespace_; 521 uint32_t surface_id_namespace_;
515 uint32_t next_surface_sequence_; 522 uint32_t next_surface_sequence_;
516 523
517 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 524 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
518 }; 525 };
519 526
520 } // namespace cc 527 } // namespace cc
521 528
522 #endif // CC_TREES_LAYER_TREE_HOST_H_ 529 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698