| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 // delegated frame. | 348 // delegated frame. |
| 349 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip); | 349 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip); |
| 350 | 350 |
| 351 // Requets a copy of the layer's output as a texture or bitmap. | 351 // Requets a copy of the layer's output as a texture or bitmap. |
| 352 void RequestCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request); | 352 void RequestCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request); |
| 353 | 353 |
| 354 // Makes this Layer scrollable, clipping to |parent_clip_layer|. |on_scroll| | 354 // Makes this Layer scrollable, clipping to |parent_clip_layer|. |on_scroll| |
| 355 // is invoked when scrolling performed by the cc::InputHandler is committed. | 355 // is invoked when scrolling performed by the cc::InputHandler is committed. |
| 356 void SetScrollable(Layer* parent_clip_layer, const base::Closure& on_scroll); | 356 void SetScrollable(Layer* parent_clip_layer, const base::Closure& on_scroll); |
| 357 | 357 |
| 358 // Gets the ElementId. For a ui::Layer, this has primaryId equal to the |
| 359 // LayerImpl's id() and a secondaryId of 0. |
| 360 cc::ElementId GetElementId() const; |
| 361 |
| 358 // Gets and sets the current scroll offset of the layer. | 362 // Gets and sets the current scroll offset of the layer. |
| 359 gfx::ScrollOffset CurrentScrollOffset() const; | 363 gfx::ScrollOffset CurrentScrollOffset() const; |
| 360 void SetScrollOffset(const gfx::ScrollOffset& offset); | 364 void SetScrollOffset(const gfx::ScrollOffset& offset); |
| 361 | 365 |
| 362 // ContentLayerClient | 366 // ContentLayerClient |
| 363 gfx::Rect PaintableRegion() override; | 367 gfx::Rect PaintableRegion() override; |
| 364 scoped_refptr<cc::DisplayItemList> PaintContentsToDisplayList( | 368 scoped_refptr<cc::DisplayItemList> PaintContentsToDisplayList( |
| 365 ContentLayerClient::PaintingControlSetting painting_control) override; | 369 ContentLayerClient::PaintingControlSetting painting_control) override; |
| 366 bool FillsBoundsCompletely() const override; | 370 bool FillsBoundsCompletely() const override; |
| 367 size_t GetApproximateUnsharedMemoryUsage() const override; | 371 size_t GetApproximateUnsharedMemoryUsage() const override; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 541 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 538 // or SetTextureMailbox was called. | 542 // or SetTextureMailbox was called. |
| 539 gfx::Size frame_size_in_dip_; | 543 gfx::Size frame_size_in_dip_; |
| 540 | 544 |
| 541 DISALLOW_COPY_AND_ASSIGN(Layer); | 545 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 542 }; | 546 }; |
| 543 | 547 |
| 544 } // namespace ui | 548 } // namespace ui |
| 545 | 549 |
| 546 #endif // UI_COMPOSITOR_LAYER_H_ | 550 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |