| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  128   void DidFailToInitializeOutputSurface(); |  128   void DidFailToInitializeOutputSurface(); | 
|  129   virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( |  129   virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( | 
|  130       LayerTreeHostImplClient* client); |  130       LayerTreeHostImplClient* client); | 
|  131   void DidLoseOutputSurface(); |  131   void DidLoseOutputSurface(); | 
|  132   bool output_surface_lost() const { return output_surface_lost_; } |  132   bool output_surface_lost() const { return output_surface_lost_; } | 
|  133   void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } |  133   void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } | 
|  134   void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } |  134   void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } | 
|  135   void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); |  135   void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); | 
|  136   bool UpdateLayers(ResourceUpdateQueue* queue); |  136   bool UpdateLayers(ResourceUpdateQueue* queue); | 
|  137  |  137  | 
 |  138   // Called when the compositor completed page scale animation. | 
 |  139   void DidCompletePageScaleAnimation(); | 
 |  140  | 
|  138   LayerTreeHostClient* client() { return client_; } |  141   LayerTreeHostClient* client() { return client_; } | 
|  139   const base::WeakPtr<InputHandler>& GetInputHandler() { |  142   const base::WeakPtr<InputHandler>& GetInputHandler() { | 
|  140     return input_handler_weak_ptr_; |  143     return input_handler_weak_ptr_; | 
|  141   } |  144   } | 
|  142  |  145  | 
|  143   void NotifyInputThrottledUntilCommit(); |  146   void NotifyInputThrottledUntilCommit(); | 
|  144  |  147  | 
|  145   void Composite(base::TimeTicks frame_begin_time); |  148   void Composite(base::TimeTicks frame_begin_time); | 
|  146  |  149  | 
|  147   void FinishAllRendering(); |  150   void FinishAllRendering(); | 
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  442   // covered by layers. |  445   // covered by layers. | 
|  443   scoped_ptr<ScopedUIResource> overhang_ui_resource_; |  446   scoped_ptr<ScopedUIResource> overhang_ui_resource_; | 
|  444  |  447  | 
|  445   typedef ScopedPtrVector<PrioritizedResource> TextureList; |  448   typedef ScopedPtrVector<PrioritizedResource> TextureList; | 
|  446   size_t partial_texture_update_requests_; |  449   size_t partial_texture_update_requests_; | 
|  447  |  450  | 
|  448   scoped_ptr<AnimationRegistrar> animation_registrar_; |  451   scoped_ptr<AnimationRegistrar> animation_registrar_; | 
|  449  |  452  | 
|  450   scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |  453   scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 
|  451  |  454  | 
 |  455   // If set, then page scale animation has completed, but the client hasn't been | 
 |  456   // notified about it yet. | 
 |  457   bool did_complete_scale_animation_; | 
 |  458  | 
|  452   bool in_paint_layer_contents_; |  459   bool in_paint_layer_contents_; | 
|  453  |  460  | 
|  454   static const int kTotalFramesToUseForLCDTextMetrics = 50; |  461   static const int kTotalFramesToUseForLCDTextMetrics = 50; | 
|  455   int total_frames_used_for_lcd_text_metrics_; |  462   int total_frames_used_for_lcd_text_metrics_; | 
|  456  |  463  | 
|  457   struct LCDTextMetrics { |  464   struct LCDTextMetrics { | 
|  458     LCDTextMetrics() |  465     LCDTextMetrics() | 
|  459         : total_num_cc_layers(0), |  466         : total_num_cc_layers(0), | 
|  460           total_num_cc_layers_can_use_lcd_text(0), |  467           total_num_cc_layers_can_use_lcd_text(0), | 
|  461           total_num_cc_layers_will_use_lcd_text(0) {} |  468           total_num_cc_layers_will_use_lcd_text(0) {} | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
|  484  |  491  | 
|  485   uint32_t surface_id_namespace_; |  492   uint32_t surface_id_namespace_; | 
|  486   uint32_t next_surface_sequence_; |  493   uint32_t next_surface_sequence_; | 
|  487  |  494  | 
|  488   DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |  495   DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 
|  489 }; |  496 }; | 
|  490  |  497  | 
|  491 }  // namespace cc |  498 }  // namespace cc | 
|  492  |  499  | 
|  493 #endif  // CC_TREES_LAYER_TREE_HOST_H_ |  500 #endif  // CC_TREES_LAYER_TREE_HOST_H_ | 
| OLD | NEW |