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

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

Issue 1172583003: [DRAFT] Animations: Profile hash look-ups for external mutators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@implscroll
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « cc/animation/animation_host.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void WillCommit(); 113 void WillCommit();
114 void CommitComplete(); 114 void CommitComplete();
115 void SetOutputSurface(scoped_ptr<OutputSurface> output_surface); 115 void SetOutputSurface(scoped_ptr<OutputSurface> output_surface);
116 void RequestNewOutputSurface(); 116 void RequestNewOutputSurface();
117 void DidInitializeOutputSurface(); 117 void DidInitializeOutputSurface();
118 void DidFailToInitializeOutputSurface(); 118 void DidFailToInitializeOutputSurface();
119 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( 119 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
120 LayerTreeHostImplClient* client); 120 LayerTreeHostImplClient* client);
121 void DidLoseOutputSurface(); 121 void DidLoseOutputSurface();
122 bool output_surface_lost() const { return output_surface_lost_; } 122 bool output_surface_lost() const { return output_surface_lost_; }
123 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } 123 void DidCommitAndDrawFrame();
124 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } 124 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); }
125 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); 125 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider);
126 bool UpdateLayers(ResourceUpdateQueue* queue); 126 bool UpdateLayers(ResourceUpdateQueue* queue);
127 127
128 // Called when the compositor completed page scale animation. 128 // Called when the compositor completed page scale animation.
129 void DidCompletePageScaleAnimation(); 129 void DidCompletePageScaleAnimation();
130 130
131 LayerTreeHostClient* client() { return client_; } 131 LayerTreeHostClient* client() { return client_; }
132 const base::WeakPtr<InputHandler>& GetInputHandler() { 132 const base::WeakPtr<InputHandler>& GetInputHandler() {
133 return input_handler_weak_ptr_; 133 return input_handler_weak_ptr_;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 bool ScrollOffsetAnimationWasInterrupted(const Layer* layer) const; 356 bool ScrollOffsetAnimationWasInterrupted(const Layer* layer) const;
357 bool IsAnimatingFilterProperty(const Layer* layer) const; 357 bool IsAnimatingFilterProperty(const Layer* layer) const;
358 bool IsAnimatingOpacityProperty(const Layer* layer) const; 358 bool IsAnimatingOpacityProperty(const Layer* layer) const;
359 bool IsAnimatingTransformProperty(const Layer* layer) const; 359 bool IsAnimatingTransformProperty(const Layer* layer) const;
360 bool HasPotentiallyRunningOpacityAnimation(const Layer* layer) const; 360 bool HasPotentiallyRunningOpacityAnimation(const Layer* layer) const;
361 bool HasPotentiallyRunningTransformAnimation(const Layer* layer) const; 361 bool HasPotentiallyRunningTransformAnimation(const Layer* layer) const;
362 bool AnimationsPreserveAxisAlignment(const Layer* layer) const; 362 bool AnimationsPreserveAxisAlignment(const Layer* layer) const;
363 bool HasAnyAnimation(const Layer* layer) const; 363 bool HasAnyAnimation(const Layer* layer) const;
364 bool HasActiveAnimation(const Layer* layer) const; 364 bool HasActiveAnimation(const Layer* layer) const;
365 365
366 void ReportAndClearStatsAfterAnimateLayers();
367
366 protected: 368 protected:
367 explicit LayerTreeHost(InitParams* params); 369 explicit LayerTreeHost(InitParams* params);
368 void InitializeThreaded( 370 void InitializeThreaded(
369 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 371 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
370 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 372 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
371 scoped_ptr<BeginFrameSource> external_begin_frame_source); 373 scoped_ptr<BeginFrameSource> external_begin_frame_source);
372 void InitializeSingleThreaded( 374 void InitializeSingleThreaded(
373 LayerTreeHostSingleThreadClient* single_thread_client, 375 LayerTreeHostSingleThreadClient* single_thread_client,
374 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 376 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
375 scoped_ptr<BeginFrameSource> external_begin_frame_source); 377 scoped_ptr<BeginFrameSource> external_begin_frame_source);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 514 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
513 TaskGraphRunner* task_graph_runner_; 515 TaskGraphRunner* task_graph_runner_;
514 516
515 ScopedPtrVector<SwapPromise> swap_promise_list_; 517 ScopedPtrVector<SwapPromise> swap_promise_list_;
516 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 518 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
517 519
518 PropertyTrees property_trees_; 520 PropertyTrees property_trees_;
519 521
520 typedef base::hash_map<int, Layer*> LayerIdMap; 522 typedef base::hash_map<int, Layer*> LayerIdMap;
521 LayerIdMap layer_id_map_; 523 LayerIdMap layer_id_map_;
524 mutable base::TimeDelta find_layer_by_id_stats_;
522 525
523 uint32_t surface_id_namespace_; 526 uint32_t surface_id_namespace_;
524 uint32_t next_surface_sequence_; 527 uint32_t next_surface_sequence_;
525 528
526 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 529 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
527 }; 530 };
528 531
529 } // namespace cc 532 } // namespace cc
530 533
531 #endif // CC_TREES_LAYER_TREE_HOST_H_ 534 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/animation/animation_host.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698