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

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

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include in perf test. Created 5 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 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 float device_scale_factor() const { return device_scale_factor_; } 243 float device_scale_factor() const { return device_scale_factor_; }
244 244
245 void UpdateTopControlsState(TopControlsState constraints, 245 void UpdateTopControlsState(TopControlsState constraints,
246 TopControlsState current, 246 TopControlsState current,
247 bool animate); 247 bool animate);
248 248
249 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } 249 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); }
250 250
251 Proxy* proxy() const { return proxy_.get(); } 251 Proxy* proxy() const { return proxy_.get(); }
252 TaskRunnerProvider* task_runner_provider() const {
253 return task_runner_provider_.get();
254 }
252 AnimationRegistrar* animation_registrar() const { 255 AnimationRegistrar* animation_registrar() const {
253 return animation_registrar_.get(); 256 return animation_registrar_.get();
254 } 257 }
255 AnimationHost* animation_host() const { return animation_host_.get(); } 258 AnimationHost* animation_host() const { return animation_host_.get(); }
256 259
257 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } 260 bool in_paint_layer_contents() const { return in_paint_layer_contents_; }
258 261
259 // CreateUIResource creates a resource given a bitmap. The bitmap is 262 // CreateUIResource creates a resource given a bitmap. The bitmap is
260 // generated via an interface function, which is called when initializing the 263 // generated via an interface function, which is called when initializing the
261 // resource and when the resource has been lost (due to lost context). The 264 // resource and when the resource has been lost (due to lost context). The
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 protected: 362 protected:
360 explicit LayerTreeHost(InitParams* params); 363 explicit LayerTreeHost(InitParams* params);
361 void InitializeThreaded( 364 void InitializeThreaded(
362 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 365 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
363 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 366 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
364 scoped_ptr<BeginFrameSource> external_begin_frame_source); 367 scoped_ptr<BeginFrameSource> external_begin_frame_source);
365 void InitializeSingleThreaded( 368 void InitializeSingleThreaded(
366 LayerTreeHostSingleThreadClient* single_thread_client, 369 LayerTreeHostSingleThreadClient* single_thread_client,
367 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 370 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
368 scoped_ptr<BeginFrameSource> external_begin_frame_source); 371 scoped_ptr<BeginFrameSource> external_begin_frame_source);
369 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); 372 void InitializeForTesting(scoped_ptr<TaskRunnerProvider> task_runner_provider,
373 scoped_ptr<Proxy> proxy_for_testing);
370 void SetOutputSurfaceLostForTesting(bool is_lost) { 374 void SetOutputSurfaceLostForTesting(bool is_lost) {
371 output_surface_lost_ = is_lost; 375 output_surface_lost_ = is_lost;
372 } 376 }
373 377
374 // shared_bitmap_manager(), gpu_memory_buffer_manager(), and 378 // shared_bitmap_manager(), gpu_memory_buffer_manager(), and
375 // task_graph_runner() return valid values only until the LayerTreeHostImpl is 379 // task_graph_runner() return valid values only until the LayerTreeHostImpl is
376 // created in CreateLayerTreeHostImpl(). 380 // created in CreateLayerTreeHostImpl().
377 SharedBitmapManager* shared_bitmap_manager() const { 381 SharedBitmapManager* shared_bitmap_manager() const {
378 return shared_bitmap_manager_; 382 return shared_bitmap_manager_;
379 } 383 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 416
413 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); 417 void NotifySwapPromiseMonitorsOfSetNeedsCommit();
414 418
415 void SetPropertyTreesNeedRebuild(); 419 void SetPropertyTreesNeedRebuild();
416 420
417 bool needs_full_tree_sync_; 421 bool needs_full_tree_sync_;
418 bool needs_meta_info_recomputation_; 422 bool needs_meta_info_recomputation_;
419 423
420 LayerTreeHostClient* client_; 424 LayerTreeHostClient* client_;
421 scoped_ptr<Proxy> proxy_; 425 scoped_ptr<Proxy> proxy_;
426 scoped_ptr<TaskRunnerProvider> task_runner_provider_;
422 427
423 int source_frame_number_; 428 int source_frame_number_;
424 int meta_information_sequence_number_; 429 int meta_information_sequence_number_;
425 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_; 430 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_;
426 431
427 // |current_output_surface_| can't be updated until we've successfully 432 // |current_output_surface_| can't be updated until we've successfully
428 // initialized a new output surface. |new_output_surface_| contains the 433 // initialized a new output surface. |new_output_surface_| contains the
429 // new output surface that is currently being initialized. If initialization 434 // new output surface that is currently being initialized. If initialization
430 // is successful then |new_output_surface_| replaces 435 // is successful then |new_output_surface_| replaces
431 // |current_output_surface_|. 436 // |current_output_surface_|.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 501
497 uint32_t surface_id_namespace_; 502 uint32_t surface_id_namespace_;
498 uint32_t next_surface_sequence_; 503 uint32_t next_surface_sequence_;
499 504
500 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 505 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
501 }; 506 };
502 507
503 } // namespace cc 508 } // namespace cc
504 509
505 #endif // CC_TREES_LAYER_TREE_HOST_H_ 510 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698