| 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 <list> | 9 #include <list> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // CreateUIResource creates a resource given a bitmap. The bitmap is | 276 // CreateUIResource creates a resource given a bitmap. The bitmap is |
| 277 // generated via an interface function, which is called when initializing the | 277 // generated via an interface function, which is called when initializing the |
| 278 // resource and when the resource has been lost (due to lost context). The | 278 // resource and when the resource has been lost (due to lost context). The |
| 279 // parameter of the interface is a single boolean, which indicates whether the | 279 // parameter of the interface is a single boolean, which indicates whether the |
| 280 // resource has been lost or not. CreateUIResource returns an Id of the | 280 // resource has been lost or not. CreateUIResource returns an Id of the |
| 281 // resource, which is always positive. | 281 // resource, which is always positive. |
| 282 virtual UIResourceId CreateUIResource(UIResourceClient* client); | 282 virtual UIResourceId CreateUIResource(UIResourceClient* client); |
| 283 // Deletes a UI resource. May safely be called more than once. | 283 // Deletes a UI resource. May safely be called more than once. |
| 284 virtual void DeleteUIResource(UIResourceId id); | 284 virtual void DeleteUIResource(UIResourceId id); |
| 285 | 285 |
| 286 virtual gfx::Size GetUIResourceSize(UIResourceId id); |
| 287 |
| 286 bool UsingSharedMemoryResources(); | 288 bool UsingSharedMemoryResources(); |
| 287 int id() const { return tree_id_; } | 289 int id() const { return tree_id_; } |
| 288 | 290 |
| 289 protected: | 291 protected: |
| 290 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); | 292 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); |
| 291 bool Initialize(scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 293 bool Initialize(scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
| 292 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 294 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
| 293 | 295 |
| 294 private: | 296 private: |
| 295 bool InitializeProxy(scoped_ptr<Proxy> proxy); | 297 bool InitializeProxy(scoped_ptr<Proxy> proxy); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 }; | 413 }; |
| 412 LCDTextMetrics lcd_text_metrics_; | 414 LCDTextMetrics lcd_text_metrics_; |
| 413 int tree_id_; | 415 int tree_id_; |
| 414 | 416 |
| 415 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 417 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 416 }; | 418 }; |
| 417 | 419 |
| 418 } // namespace cc | 420 } // namespace cc |
| 419 | 421 |
| 420 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 422 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |