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

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

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: Added Add/RemoveChildFrameSink() to WindowAndroidCompositor Created 3 years, 10 months 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
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 cc::CopyOutputRequest::CopyOutputRequestCallback result_callback); 62 cc::CopyOutputRequest::CopyOutputRequestCallback result_callback);
63 63
64 void CompositorFrameSinkChanged(); 64 void CompositorFrameSinkChanged();
65 65
66 void UpdateBackgroundColor(SkColor color); 66 void UpdateBackgroundColor(SkColor color);
67 67
68 void UpdateContainerSizeinDIP(const gfx::Size& size_in_dip); 68 void UpdateContainerSizeinDIP(const gfx::Size& size_in_dip);
69 69
70 // Called when this DFH is attached/detached from a parent browser compositor 70 // Called when this DFH is attached/detached from a parent browser compositor
71 // and needs to be attached to the surface hierarchy. 71 // and needs to be attached to the surface hierarchy.
72 void RegisterFrameSinkHierarchy(const cc::FrameSinkId& parent_id); 72 void AttachToCompositor(WindowAndroidCompositor* compositor);
73 void UnregisterFrameSinkHierarchy(); 73 void DetachFromCompositor();
74 74
75 private: 75 private:
76 // cc::SurfaceFactoryClient implementation. 76 // cc::SurfaceFactoryClient implementation.
77 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 77 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
78 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 78 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
79 79
80 void UpdateBackgroundLayer(); 80 void UpdateBackgroundLayer();
81 81
82 const cc::FrameSinkId frame_sink_id_; 82 const cc::FrameSinkId frame_sink_id_;
83 83
84 ViewAndroid* view_; 84 ViewAndroid* view_;
85 85
86 cc::SurfaceManager* surface_manager_; 86 cc::SurfaceManager* surface_manager_;
87 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 87 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
88 cc::FrameSinkId registered_parent_frame_sink_id_; 88 WindowAndroidCompositor* parent_compositor_impl_;
89 Client* client_; 89 Client* client_;
90 90
91 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 91 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
92 92
93 struct FrameData { 93 struct FrameData {
94 FrameData(); 94 FrameData();
95 ~FrameData(); 95 ~FrameData();
96 96
97 cc::LocalSurfaceId local_surface_id; 97 cc::LocalSurfaceId local_surface_id;
98 gfx::Size surface_size; 98 gfx::Size surface_size;
(...skipping 11 matching lines...) Expand all
110 scoped_refptr<cc::Layer> background_layer_; 110 scoped_refptr<cc::Layer> background_layer_;
111 111
112 gfx::Size container_size_in_dip_; 112 gfx::Size container_size_in_dip_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid); 114 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid);
115 }; 115 };
116 116
117 } // namespace ui 117 } // namespace ui
118 118
119 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_ 119 #endif // UI_ANDROID_DELEGATED_FRAME_HOST_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698