| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
| 6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 std::unique_ptr<cc::SingleReleaseCallback> release_callback, | 289 std::unique_ptr<cc::SingleReleaseCallback> release_callback, |
| 290 gfx::Size texture_size_in_dip); | 290 gfx::Size texture_size_in_dip); |
| 291 void SetTextureSize(gfx::Size texture_size_in_dip); | 291 void SetTextureSize(gfx::Size texture_size_in_dip); |
| 292 void SetTextureFlipped(bool flipped); | 292 void SetTextureFlipped(bool flipped); |
| 293 bool TextureFlipped() const; | 293 bool TextureFlipped() const; |
| 294 | 294 |
| 295 // Begins showing content from a surface with a particular id. | 295 // Begins showing content from a surface with a particular id. |
| 296 void SetShowSurface(const cc::SurfaceId& surface_id, | 296 void SetShowSurface(const cc::SurfaceId& surface_id, |
| 297 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, | 297 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, |
| 298 const cc::SurfaceLayer::RequireCallback& require_callback, | 298 const cc::SurfaceLayer::RequireCallback& require_callback, |
| 299 gfx::Size surface_size, | 299 const gfx::Size& surface_size_in_pixels, |
| 300 float scale, | 300 float scale); |
| 301 gfx::Size frame_size_in_dip); | |
| 302 | 301 |
| 303 bool has_external_content() { | 302 bool has_external_content() { |
| 304 return texture_layer_.get() || surface_layer_.get(); | 303 return texture_layer_.get() || surface_layer_.get(); |
| 305 } | 304 } |
| 306 | 305 |
| 307 // Show a solid color instead of delegated or surface contents. | 306 // Show a solid color instead of delegated or surface contents. |
| 308 void SetShowSolidColorContent(); | 307 void SetShowSolidColorContent(); |
| 309 | 308 |
| 310 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. | 309 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. |
| 311 void SetColor(SkColor color); | 310 void SetColor(SkColor color); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 void didUpdateMainThreadScrollingReasons() override; | 380 void didUpdateMainThreadScrollingReasons() override; |
| 382 void didChangeScrollbarsHidden(bool) override; | 381 void didChangeScrollbarsHidden(bool) override; |
| 383 | 382 |
| 384 // Triggers a call to SwitchToLayer. | 383 // Triggers a call to SwitchToLayer. |
| 385 void SwitchCCLayerForTest(); | 384 void SwitchCCLayerForTest(); |
| 386 | 385 |
| 387 const cc::Region& damaged_region_for_testing() const { | 386 const cc::Region& damaged_region_for_testing() const { |
| 388 return damaged_region_; | 387 return damaged_region_; |
| 389 } | 388 } |
| 390 | 389 |
| 390 const gfx::Size& frame_size_in_dip_for_testing() const { |
| 391 return frame_size_in_dip_; |
| 392 } |
| 393 |
| 391 private: | 394 private: |
| 392 friend class LayerOwner; | 395 friend class LayerOwner; |
| 393 class LayerMirror; | 396 class LayerMirror; |
| 394 | 397 |
| 395 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); | 398 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); |
| 396 | 399 |
| 397 // Stacks |child| above or below |other|. Helper method for StackAbove() and | 400 // Stacks |child| above or below |other|. Helper method for StackAbove() and |
| 398 // StackBelow(). | 401 // StackBelow(). |
| 399 void StackRelativeTo(Layer* child, Layer* other, bool above); | 402 void StackRelativeTo(Layer* child, Layer* other, bool above); |
| 400 | 403 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 540 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 538 // or SetTextureMailbox was called. | 541 // or SetTextureMailbox was called. |
| 539 gfx::Size frame_size_in_dip_; | 542 gfx::Size frame_size_in_dip_; |
| 540 | 543 |
| 541 DISALLOW_COPY_AND_ASSIGN(Layer); | 544 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 542 }; | 545 }; |
| 543 | 546 |
| 544 } // namespace ui | 547 } // namespace ui |
| 545 | 548 |
| 546 #endif // UI_COMPOSITOR_LAYER_H_ | 549 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |