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

Side by Side Diff: cc/surfaces/display.h

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setvisible-browser: . Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CC_SURFACES_DISPLAY_H_ 5 #ifndef CC_SURFACES_DISPLAY_H_
6 #define CC_SURFACES_DISPLAY_H_ 6 #define CC_SURFACES_DISPLAY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 ~Display() override; 67 ~Display() override;
68 68
69 void Initialize(DisplayClient* client, 69 void Initialize(DisplayClient* client,
70 SurfaceManager* surface_manager, 70 SurfaceManager* surface_manager,
71 uint32_t compositor_surface_namespace); 71 uint32_t compositor_surface_namespace);
72 72
73 // device_scale_factor is used to communicate to the external window system 73 // device_scale_factor is used to communicate to the external window system
74 // what scale this was rendered at. 74 // what scale this was rendered at.
75 void SetSurfaceId(const SurfaceId& id, float device_scale_factor); 75 void SetSurfaceId(const SurfaceId& id, float device_scale_factor);
76 void SetVisible(bool visible);
76 void Resize(const gfx::Size& new_size); 77 void Resize(const gfx::Size& new_size);
77 void SetColorSpace(const gfx::ColorSpace& color_space); 78 void SetColorSpace(const gfx::ColorSpace& color_space);
78 void SetExternalClip(const gfx::Rect& clip); 79 void SetExternalClip(const gfx::Rect& clip);
79 void SetExternalViewport(const gfx::Rect& viewport); 80 void SetExternalViewport(const gfx::Rect& viewport);
80 void SetOutputIsSecure(bool secure); 81 void SetOutputIsSecure(bool secure);
81 82
82 const SurfaceId& CurrentSurfaceId(); 83 const SurfaceId& CurrentSurfaceId();
83 84
84 // DisplaySchedulerClient implementation. 85 // DisplaySchedulerClient implementation.
85 bool DrawAndSwap() override; 86 bool DrawAndSwap() override;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 gpu::GpuMemoryBufferManager* const gpu_memory_buffer_manager_; 126 gpu::GpuMemoryBufferManager* const gpu_memory_buffer_manager_;
126 const RendererSettings settings_; 127 const RendererSettings settings_;
127 128
128 DisplayClient* client_ = nullptr; 129 DisplayClient* client_ = nullptr;
129 SurfaceManager* surface_manager_ = nullptr; 130 SurfaceManager* surface_manager_ = nullptr;
130 uint32_t compositor_surface_namespace_; 131 uint32_t compositor_surface_namespace_;
131 SurfaceId current_surface_id_; 132 SurfaceId current_surface_id_;
132 gfx::Size current_surface_size_; 133 gfx::Size current_surface_size_;
133 float device_scale_factor_ = 1.f; 134 float device_scale_factor_ = 1.f;
134 gfx::ColorSpace device_color_space_; 135 gfx::ColorSpace device_color_space_;
136 bool visible_ = false;
135 bool swapped_since_resize_ = false; 137 bool swapped_since_resize_ = false;
136 gfx::Rect external_clip_; 138 gfx::Rect external_clip_;
137 gfx::Rect external_viewport_; 139 gfx::Rect external_viewport_;
138 gfx::Size enlarge_texture_amount_; 140 gfx::Size enlarge_texture_amount_;
139 bool output_is_secure_ = false; 141 bool output_is_secure_ = false;
140 142
141 // The begin_frame_source_ is often known by the output_surface_ and 143 // The begin_frame_source_ is often known by the output_surface_ and
142 // the scheduler_. 144 // the scheduler_.
143 std::unique_ptr<BeginFrameSource> begin_frame_source_; 145 std::unique_ptr<BeginFrameSource> begin_frame_source_;
144 std::unique_ptr<OutputSurface> output_surface_; 146 std::unique_ptr<OutputSurface> output_surface_;
145 std::unique_ptr<DisplayScheduler> scheduler_; 147 std::unique_ptr<DisplayScheduler> scheduler_;
146 std::unique_ptr<ResourceProvider> resource_provider_; 148 std::unique_ptr<ResourceProvider> resource_provider_;
147 std::unique_ptr<SurfaceAggregator> aggregator_; 149 std::unique_ptr<SurfaceAggregator> aggregator_;
148 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; 150 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
149 std::unique_ptr<DirectRenderer> renderer_; 151 std::unique_ptr<DirectRenderer> renderer_;
150 SoftwareRenderer* software_renderer_ = nullptr; 152 SoftwareRenderer* software_renderer_ = nullptr;
151 std::vector<ui::LatencyInfo> stored_latency_info_; 153 std::vector<ui::LatencyInfo> stored_latency_info_;
152 154
153 private: 155 private:
154 DISALLOW_COPY_AND_ASSIGN(Display); 156 DISALLOW_COPY_AND_ASSIGN(Display);
155 }; 157 };
156 158
157 } // namespace cc 159 } // namespace cc
158 160
159 #endif // CC_SURFACES_DISPLAY_H_ 161 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698