| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ | 5 #ifndef UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ |
| 6 #define UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ | 6 #define UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const gfx::Rect& src_subrect_in_pixel, | 61 const gfx::Rect& src_subrect_in_pixel, |
| 62 cc::CopyOutputRequest::CopyOutputRequestCallback result_callback); | 62 cc::CopyOutputRequest::CopyOutputRequestCallback result_callback); |
| 63 | 63 |
| 64 void CompositorFrameSinkChanged(); | 64 void CompositorFrameSinkChanged(); |
| 65 | 65 |
| 66 // Called when this DFH is attached/detached from a parent browser compositor | 66 // Called when this DFH is attached/detached from a parent browser compositor |
| 67 // and needs to be attached to the surface hierarchy. | 67 // and needs to be attached to the surface hierarchy. |
| 68 void AttachToCompositor(WindowAndroidCompositor* compositor); | 68 void AttachToCompositor(WindowAndroidCompositor* compositor); |
| 69 void DetachFromCompositor(); | 69 void DetachFromCompositor(); |
| 70 | 70 |
| 71 // Returns the ID for the current Surface. |
| 72 cc::SurfaceId SurfaceId() const; |
| 73 |
| 71 private: | 74 private: |
| 72 // cc::CompositorFrameSinkSupportClient implementation. | 75 // cc::CompositorFrameSinkSupportClient implementation. |
| 73 void DidReceiveCompositorFrameAck() override; | 76 void DidReceiveCompositorFrameAck() override; |
| 74 void OnBeginFrame(const cc::BeginFrameArgs& args) override; | 77 void OnBeginFrame(const cc::BeginFrameArgs& args) override; |
| 75 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 78 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
| 76 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, | 79 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, |
| 77 const gfx::Rect& damage_rect) override; | 80 const gfx::Rect& damage_rect) override; |
| 78 | 81 |
| 79 // cc::ExternalBeginFrameSourceClient implementation. | 82 // cc::ExternalBeginFrameSourceClient implementation. |
| 80 void OnNeedsBeginFrames(bool needs_begin_frames) override; | 83 void OnNeedsBeginFrames(bool needs_begin_frames) override; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 110 std::unique_ptr<FrameData> current_frame_; | 113 std::unique_ptr<FrameData> current_frame_; |
| 111 | 114 |
| 112 scoped_refptr<cc::SurfaceLayer> content_layer_; | 115 scoped_refptr<cc::SurfaceLayer> content_layer_; |
| 113 | 116 |
| 114 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid); | 117 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid); |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 } // namespace ui | 120 } // namespace ui |
| 118 | 121 |
| 119 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ | 122 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ |
| OLD | NEW |