OLD | NEW |
---|---|
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 15 matching lines...) Expand all Loading... | |
26 #include "cc/input/layer_selection_bound.h" | 26 #include "cc/input/layer_selection_bound.h" |
27 #include "cc/input/scrollbar.h" | 27 #include "cc/input/scrollbar.h" |
28 #include "cc/input/top_controls_state.h" | 28 #include "cc/input/top_controls_state.h" |
29 #include "cc/layers/layer_lists.h" | 29 #include "cc/layers/layer_lists.h" |
30 #include "cc/output/output_surface.h" | 30 #include "cc/output/output_surface.h" |
31 #include "cc/output/renderer_capabilities.h" | 31 #include "cc/output/renderer_capabilities.h" |
32 #include "cc/output/swap_promise.h" | 32 #include "cc/output/swap_promise.h" |
33 #include "cc/resources/resource_format.h" | 33 #include "cc/resources/resource_format.h" |
34 #include "cc/resources/scoped_ui_resource.h" | 34 #include "cc/resources/scoped_ui_resource.h" |
35 #include "cc/surfaces/surface_sequence.h" | 35 #include "cc/surfaces/surface_sequence.h" |
36 #include "cc/trees/compositor_mode.h" | |
36 #include "cc/trees/layer_tree_host_client.h" | 37 #include "cc/trees/layer_tree_host_client.h" |
37 #include "cc/trees/layer_tree_host_common.h" | 38 #include "cc/trees/layer_tree_host_common.h" |
38 #include "cc/trees/layer_tree_settings.h" | 39 #include "cc/trees/layer_tree_settings.h" |
39 #include "cc/trees/mutator_host_client.h" | 40 #include "cc/trees/mutator_host_client.h" |
40 #include "cc/trees/proxy.h" | 41 #include "cc/trees/proxy.h" |
41 #include "cc/trees/swap_promise_monitor.h" | 42 #include "cc/trees/swap_promise_monitor.h" |
42 #include "third_party/skia/include/core/SkColor.h" | 43 #include "third_party/skia/include/core/SkColor.h" |
43 #include "ui/gfx/geometry/rect.h" | 44 #include "ui/gfx/geometry/rect.h" |
44 | 45 |
45 namespace gpu { | 46 namespace gpu { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
352 bool MaximumTargetScale(const Layer* layer, float* max_scale) const; | 353 bool MaximumTargetScale(const Layer* layer, float* max_scale) const; |
353 bool AnimationStartScale(const Layer* layer, float* start_scale) const; | 354 bool AnimationStartScale(const Layer* layer, float* start_scale) const; |
354 bool HasAnyAnimationTargetingProperty( | 355 bool HasAnyAnimationTargetingProperty( |
355 const Layer* layer, | 356 const Layer* layer, |
356 Animation::TargetProperty property) const; | 357 Animation::TargetProperty property) const; |
357 bool AnimationsPreserveAxisAlignment(const Layer* layer) const; | 358 bool AnimationsPreserveAxisAlignment(const Layer* layer) const; |
358 bool HasAnyAnimation(const Layer* layer) const; | 359 bool HasAnyAnimation(const Layer* layer) const; |
359 bool HasActiveAnimation(const Layer* layer) const; | 360 bool HasActiveAnimation(const Layer* layer) const; |
360 | 361 |
361 protected: | 362 protected: |
362 explicit LayerTreeHost(InitParams* params); | 363 LayerTreeHost(InitParams* params, CompositorMode mode); |
363 void InitializeThreaded( | 364 void InitializeThreaded( |
364 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 365 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
365 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 366 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
366 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 367 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
367 void InitializeSingleThreaded( | 368 void InitializeSingleThreaded( |
368 LayerTreeHostSingleThreadClient* single_thread_client, | 369 LayerTreeHostSingleThreadClient* single_thread_client, |
369 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 370 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
370 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 371 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
371 void InitializeForTesting(scoped_ptr<TaskRunnerProvider> task_runner_provider, | 372 void InitializeForTesting(scoped_ptr<TaskRunnerProvider> task_runner_provider, |
372 scoped_ptr<Proxy> proxy_for_testing); | 373 scoped_ptr<Proxy> proxy_for_testing); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
410 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; | 411 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; |
411 UIResourceRequestQueue ui_resource_request_queue_; | 412 UIResourceRequestQueue ui_resource_request_queue_; |
412 | 413 |
413 void RecordGpuRasterizationHistogram(); | 414 void RecordGpuRasterizationHistogram(); |
414 void CalculateLCDTextMetricsCallback(Layer* layer); | 415 void CalculateLCDTextMetricsCallback(Layer* layer); |
415 | 416 |
416 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); | 417 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); |
417 | 418 |
418 void SetPropertyTreesNeedRebuild(); | 419 void SetPropertyTreesNeedRebuild(); |
419 | 420 |
421 const CompositorMode compositor_mode_; | |
vmpstr
2015/12/07 18:50:09
Functions before variables, please.
Khushal
2015/12/07 21:49:26
Done.
| |
422 bool IsSingleThreaded() const; | |
423 bool IsThreaded() const; | |
424 | |
420 bool needs_full_tree_sync_; | 425 bool needs_full_tree_sync_; |
421 bool needs_meta_info_recomputation_; | 426 bool needs_meta_info_recomputation_; |
422 | 427 |
423 LayerTreeHostClient* client_; | 428 LayerTreeHostClient* client_; |
424 scoped_ptr<Proxy> proxy_; | 429 scoped_ptr<Proxy> proxy_; |
425 scoped_ptr<TaskRunnerProvider> task_runner_provider_; | 430 scoped_ptr<TaskRunnerProvider> task_runner_provider_; |
426 | 431 |
427 int source_frame_number_; | 432 int source_frame_number_; |
428 int meta_information_sequence_number_; | 433 int meta_information_sequence_number_; |
429 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_; | 434 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
500 | 505 |
501 uint32_t surface_id_namespace_; | 506 uint32_t surface_id_namespace_; |
502 uint32_t next_surface_sequence_; | 507 uint32_t next_surface_sequence_; |
503 | 508 |
504 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 509 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
505 }; | 510 }; |
506 | 511 |
507 } // namespace cc | 512 } // namespace cc |
508 | 513 |
509 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 514 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |