Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: ui/android/delegated_frame_host_android.h

Issue 2585993002: Revert of [android] Make RWHVAndroid a BeginFrameObserver. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/android/DEPS ('k') | ui/android/delegated_frame_host_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 25
26 } // namespace cc 26 } // namespace cc
27 27
28 namespace ui { 28 namespace ui {
29 class ViewAndroid; 29 class ViewAndroid;
30 class WindowAndroidCompositor; 30 class WindowAndroidCompositor;
31 31
32 class UI_ANDROID_EXPORT DelegatedFrameHostAndroid 32 class UI_ANDROID_EXPORT DelegatedFrameHostAndroid
33 : public cc::SurfaceFactoryClient { 33 : public cc::SurfaceFactoryClient {
34 public: 34 public:
35 class Client { 35 using ReturnResourcesCallback =
36 public: 36 base::Callback<void(const cc::ReturnedResourceArray&)>;
37 virtual void SetBeginFrameSource(
38 cc::BeginFrameSource* begin_frame_source) = 0;
39 virtual void ReturnResources(const cc::ReturnedResourceArray&) = 0;
40 };
41 37
42 DelegatedFrameHostAndroid(ViewAndroid* view, 38 DelegatedFrameHostAndroid(ViewAndroid* view,
43 SkColor background_color, 39 SkColor background_color,
44 Client* client); 40 ReturnResourcesCallback return_resources_callback);
45 41
46 ~DelegatedFrameHostAndroid() override; 42 ~DelegatedFrameHostAndroid() override;
47 43
48 void SubmitCompositorFrame(cc::CompositorFrame frame, 44 void SubmitCompositorFrame(cc::CompositorFrame frame,
49 cc::SurfaceFactory::DrawCallback draw_callback); 45 cc::SurfaceFactory::DrawCallback draw_callback);
50 46
51 void DestroyDelegatedContent(); 47 void DestroyDelegatedContent();
52 48
53 bool HasDelegatedContent() const; 49 bool HasDelegatedContent() const;
54 50
(...skipping 23 matching lines...) Expand all
78 74
79 void UpdateBackgroundLayer(); 75 void UpdateBackgroundLayer();
80 76
81 const cc::FrameSinkId frame_sink_id_; 77 const cc::FrameSinkId frame_sink_id_;
82 78
83 ViewAndroid* view_; 79 ViewAndroid* view_;
84 80
85 cc::SurfaceManager* surface_manager_; 81 cc::SurfaceManager* surface_manager_;
86 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 82 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
87 cc::FrameSinkId registered_parent_frame_sink_id_; 83 cc::FrameSinkId registered_parent_frame_sink_id_;
88 Client* client_; 84 ReturnResourcesCallback return_resources_callback_;
89 85
90 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 86 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
91 87
92 struct FrameData { 88 struct FrameData {
93 FrameData(); 89 FrameData();
94 ~FrameData(); 90 ~FrameData();
95 91
96 cc::LocalFrameId local_frame_id; 92 cc::LocalFrameId local_frame_id;
97 gfx::Size surface_size; 93 gfx::Size surface_size;
98 float top_controls_height; 94 float top_controls_height;
(...skipping 10 matching lines...) Expand all
109 scoped_refptr<cc::Layer> background_layer_; 105 scoped_refptr<cc::Layer> background_layer_;
110 106
111 gfx::Size container_size_in_dip_; 107 gfx::Size container_size_in_dip_;
112 108
113 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid); 109 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid);
114 }; 110 };
115 111
116 } // namespace ui 112 } // namespace ui
117 113
118 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ 114 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_
OLDNEW
« no previous file with comments | « ui/android/DEPS ('k') | ui/android/delegated_frame_host_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698