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

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: onemore 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
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/surfaces/display.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 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 gpu::GpuMemoryBufferManager* const gpu_memory_buffer_manager_; 128 gpu::GpuMemoryBufferManager* const gpu_memory_buffer_manager_;
128 const RendererSettings settings_; 129 const RendererSettings settings_;
129 130
130 DisplayClient* client_ = nullptr; 131 DisplayClient* client_ = nullptr;
131 SurfaceManager* surface_manager_ = nullptr; 132 SurfaceManager* surface_manager_ = nullptr;
132 uint32_t compositor_surface_namespace_; 133 uint32_t compositor_surface_namespace_;
133 SurfaceId current_surface_id_; 134 SurfaceId current_surface_id_;
134 gfx::Size current_surface_size_; 135 gfx::Size current_surface_size_;
135 float device_scale_factor_ = 1.f; 136 float device_scale_factor_ = 1.f;
136 gfx::ColorSpace device_color_space_; 137 gfx::ColorSpace device_color_space_;
138 bool visible_ = false;
137 bool swapped_since_resize_ = false; 139 bool swapped_since_resize_ = false;
138 gfx::Rect external_clip_; 140 gfx::Rect external_clip_;
139 gfx::Rect external_viewport_; 141 gfx::Rect external_viewport_;
140 gfx::Size enlarge_texture_amount_; 142 gfx::Size enlarge_texture_amount_;
141 bool output_is_secure_ = false; 143 bool output_is_secure_ = false;
142 144
143 // The begin_frame_source_ is often known by the output_surface_ and 145 // The begin_frame_source_ is often known by the output_surface_ and
144 // the scheduler_. 146 // the scheduler_.
145 std::unique_ptr<BeginFrameSource> begin_frame_source_; 147 std::unique_ptr<BeginFrameSource> begin_frame_source_;
146 std::unique_ptr<OutputSurface> output_surface_; 148 std::unique_ptr<OutputSurface> output_surface_;
147 std::unique_ptr<DisplayScheduler> scheduler_; 149 std::unique_ptr<DisplayScheduler> scheduler_;
148 std::unique_ptr<ResourceProvider> resource_provider_; 150 std::unique_ptr<ResourceProvider> resource_provider_;
149 std::unique_ptr<SurfaceAggregator> aggregator_; 151 std::unique_ptr<SurfaceAggregator> aggregator_;
150 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; 152 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
151 std::unique_ptr<DirectRenderer> renderer_; 153 std::unique_ptr<DirectRenderer> renderer_;
152 SoftwareRenderer* software_renderer_ = nullptr; 154 SoftwareRenderer* software_renderer_ = nullptr;
153 std::vector<ui::LatencyInfo> stored_latency_info_; 155 std::vector<ui::LatencyInfo> stored_latency_info_;
154 156
155 private: 157 private:
156 DISALLOW_COPY_AND_ASSIGN(Display); 158 DISALLOW_COPY_AND_ASSIGN(Display);
157 }; 159 };
158 160
159 } // namespace cc 161 } // namespace cc
160 162
161 #endif // CC_SURFACES_DISPLAY_H_ 163 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698