| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 cc::SurfaceId SurfaceId() const; | 72 cc::SurfaceId SurfaceId() const; |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 // cc::CompositorFrameSinkSupportClient implementation. | 75 // cc::CompositorFrameSinkSupportClient implementation. |
| 76 void DidReceiveCompositorFrameAck( | 76 void DidReceiveCompositorFrameAck( |
| 77 const cc::ReturnedResourceArray& resources) override; | 77 const cc::ReturnedResourceArray& resources) override; |
| 78 void OnBeginFrame(const cc::BeginFrameArgs& args) override; | 78 void OnBeginFrame(const cc::BeginFrameArgs& args) override; |
| 79 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 79 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
| 80 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, | 80 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, |
| 81 const gfx::Rect& damage_rect) override; | 81 const gfx::Rect& damage_rect) override; |
| 82 void DidRejectCompositorFrame() override; |
| 82 | 83 |
| 83 // cc::ExternalBeginFrameSourceClient implementation. | 84 // cc::ExternalBeginFrameSourceClient implementation. |
| 84 void OnNeedsBeginFrames(bool needs_begin_frames) override; | 85 void OnNeedsBeginFrames(bool needs_begin_frames) override; |
| 85 void OnDidFinishFrame(const cc::BeginFrameAck& ack) override; | 86 void OnDidFinishFrame(const cc::BeginFrameAck& ack) override; |
| 86 | 87 |
| 87 void CreateNewCompositorFrameSinkSupport(); | 88 void CreateNewCompositorFrameSinkSupport(); |
| 88 | 89 |
| 89 const cc::FrameSinkId frame_sink_id_; | 90 const cc::FrameSinkId frame_sink_id_; |
| 90 | 91 |
| 91 ViewAndroid* view_; | 92 ViewAndroid* view_; |
| 92 | 93 |
| 93 cc::SurfaceManager* surface_manager_; | 94 cc::SurfaceManager* surface_manager_; |
| 94 WindowAndroidCompositor* registered_parent_compositor_ = nullptr; | 95 WindowAndroidCompositor* registered_parent_compositor_ = nullptr; |
| 95 Client* client_; | 96 Client* client_; |
| 96 | 97 |
| 97 std::unique_ptr<cc::CompositorFrameSinkSupport> support_; | 98 std::unique_ptr<cc::CompositorFrameSinkSupport> support_; |
| 98 cc::ExternalBeginFrameSource begin_frame_source_; | 99 cc::ExternalBeginFrameSource begin_frame_source_; |
| 99 | 100 |
| 100 cc::SurfaceInfo surface_info_; | 101 cc::SurfaceInfo surface_info_; |
| 101 bool has_transparent_background_ = false; | 102 bool has_transparent_background_ = false; |
| 102 | 103 |
| 103 scoped_refptr<cc::SurfaceLayer> content_layer_; | 104 scoped_refptr<cc::SurfaceLayer> content_layer_; |
| 104 | 105 |
| 105 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid); | 106 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid); |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } // namespace ui | 109 } // namespace ui |
| 109 | 110 |
| 110 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ | 111 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ |
| OLD | NEW |