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

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

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. 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 using ReturnResourcesCallback = 35 class Client {
36 base::Callback<void(const cc::ReturnedResourceArray&)>; 36 public:
37 virtual void SetBeginFrameSource(
38 cc::BeginFrameSource* begin_frame_source) = 0;
39 virtual void ReturnResources(const cc::ReturnedResourceArray&) = 0;
40 };
37 41
38 DelegatedFrameHostAndroid(ViewAndroid* view, 42 DelegatedFrameHostAndroid(ViewAndroid* view,
39 SkColor background_color, 43 SkColor background_color,
40 ReturnResourcesCallback return_resources_callback); 44 Client* client);
41 45
42 ~DelegatedFrameHostAndroid() override; 46 ~DelegatedFrameHostAndroid() override;
43 47
44 void SubmitCompositorFrame(cc::CompositorFrame frame, 48 void SubmitCompositorFrame(cc::CompositorFrame frame,
45 cc::SurfaceFactory::DrawCallback draw_callback); 49 cc::SurfaceFactory::DrawCallback draw_callback);
46 50
47 void DestroyDelegatedContent(); 51 void DestroyDelegatedContent();
48 52
49 bool HasDelegatedContent() const; 53 bool HasDelegatedContent() const;
50 54
(...skipping 23 matching lines...) Expand all
74 78
75 void UpdateBackgroundLayer(); 79 void UpdateBackgroundLayer();
76 80
77 const cc::FrameSinkId frame_sink_id_; 81 const cc::FrameSinkId frame_sink_id_;
78 82
79 ViewAndroid* view_; 83 ViewAndroid* view_;
80 84
81 cc::SurfaceManager* surface_manager_; 85 cc::SurfaceManager* surface_manager_;
82 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 86 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
83 cc::FrameSinkId registered_parent_frame_sink_id_; 87 cc::FrameSinkId registered_parent_frame_sink_id_;
84 ReturnResourcesCallback return_resources_callback_; 88 Client* client_;
85 89
86 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 90 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
87 91
88 struct FrameData { 92 struct FrameData {
89 FrameData(); 93 FrameData();
90 ~FrameData(); 94 ~FrameData();
91 95
92 cc::LocalFrameId local_frame_id; 96 cc::LocalFrameId local_frame_id;
93 gfx::Size surface_size; 97 gfx::Size surface_size;
94 float top_controls_height; 98 float top_controls_height;
(...skipping 10 matching lines...) Expand all
105 scoped_refptr<cc::Layer> background_layer_; 109 scoped_refptr<cc::Layer> background_layer_;
106 110
107 gfx::Size container_size_in_dip_; 111 gfx::Size container_size_in_dip_;
108 112
109 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid); 113 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid);
110 }; 114 };
111 115
112 } // namespace ui 116 } // namespace ui
113 117
114 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ 118 #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