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

Side by Side Diff: ui/compositor/compositor.h

Issue 2102203003: Color: Plumb color profile from ui::Compositor to cc::DirectRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of s/ColorProfile/ColorSpace/ Created 4 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_
6 #define UI_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "cc/output/begin_frame_args.h" 19 #include "cc/output/begin_frame_args.h"
20 #include "cc/surfaces/surface_sequence.h" 20 #include "cc/surfaces/surface_sequence.h"
21 #include "cc/trees/layer_tree_host_client.h" 21 #include "cc/trees/layer_tree_host_client.h"
22 #include "cc/trees/layer_tree_host_single_thread_client.h" 22 #include "cc/trees/layer_tree_host_single_thread_client.h"
23 #include "third_party/skia/include/core/SkColor.h" 23 #include "third_party/skia/include/core/SkColor.h"
24 #include "ui/compositor/compositor_animation_observer.h" 24 #include "ui/compositor/compositor_animation_observer.h"
25 #include "ui/compositor/compositor_export.h" 25 #include "ui/compositor/compositor_export.h"
26 #include "ui/compositor/compositor_observer.h" 26 #include "ui/compositor/compositor_observer.h"
27 #include "ui/compositor/layer_animator_collection.h" 27 #include "ui/compositor/layer_animator_collection.h"
28 #include "ui/gfx/color_space.h"
28 #include "ui/gfx/geometry/size.h" 29 #include "ui/gfx/geometry/size.h"
29 #include "ui/gfx/geometry/vector2d.h" 30 #include "ui/gfx/geometry/vector2d.h"
30 #include "ui/gfx/gpu_memory_buffer.h" 31 #include "ui/gfx/gpu_memory_buffer.h"
31 #include "ui/gfx/native_widget_types.h" 32 #include "ui/gfx/native_widget_types.h"
32 33
33 namespace base { 34 namespace base {
34 class RunLoop; 35 class RunLoop;
35 class SingleThreadTaskRunner; 36 class SingleThreadTaskRunner;
36 } 37 }
37 38
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual std::unique_ptr<cc::SurfaceIdAllocator> 132 virtual std::unique_ptr<cc::SurfaceIdAllocator>
132 CreateSurfaceIdAllocator() = 0; 133 CreateSurfaceIdAllocator() = 0;
133 134
134 // Gets the surface manager. 135 // Gets the surface manager.
135 virtual cc::SurfaceManager* GetSurfaceManager() = 0; 136 virtual cc::SurfaceManager* GetSurfaceManager() = 0;
136 137
137 // Resize the display corresponding to this compositor to a particular size. 138 // Resize the display corresponding to this compositor to a particular size.
138 virtual void ResizeDisplay(ui::Compositor* compositor, 139 virtual void ResizeDisplay(ui::Compositor* compositor,
139 const gfx::Size& size) = 0; 140 const gfx::Size& size) = 0;
140 141
142 // Set the output color profile into which this compositor should render.
143 virtual void SetDisplayColorSpace(ui::Compositor* compositor,
144 const gfx::ColorSpace& color_space) = 0;
145
141 virtual void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, 146 virtual void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
142 base::TimeDelta interval) = 0; 147 base::TimeDelta interval) = 0;
143 148
144 virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0; 149 virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0;
145 150
146 virtual void AddObserver(ContextFactoryObserver* observer) = 0; 151 virtual void AddObserver(ContextFactoryObserver* observer) = 0;
147 152
148 virtual void RemoveObserver(ContextFactoryObserver* observer) = 0; 153 virtual void RemoveObserver(ContextFactoryObserver* observer) = 0;
149 }; 154 };
150 155
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 233
229 // Finishes all outstanding rendering and disables swapping on this surface 234 // Finishes all outstanding rendering and disables swapping on this surface
230 // until it is resized. 235 // until it is resized.
231 void DisableSwapUntilResize(); 236 void DisableSwapUntilResize();
232 237
233 void SetLatencyInfo(const LatencyInfo& latency_info); 238 void SetLatencyInfo(const LatencyInfo& latency_info);
234 239
235 // Sets the compositor's device scale factor and size. 240 // Sets the compositor's device scale factor and size.
236 void SetScaleAndSize(float scale, const gfx::Size& size_in_pixel); 241 void SetScaleAndSize(float scale, const gfx::Size& size_in_pixel);
237 242
243 // Set the output color profile into which this compositor should render.
244 void SetDisplayColorSpace(const gfx::ColorSpace& color_space);
245
238 // Returns the size of the widget that is being drawn to in pixel coordinates. 246 // Returns the size of the widget that is being drawn to in pixel coordinates.
239 const gfx::Size& size() const { return size_; } 247 const gfx::Size& size() const { return size_; }
240 248
241 // Sets the background color used for areas that aren't covered by 249 // Sets the background color used for areas that aren't covered by
242 // the |root_layer|. 250 // the |root_layer|.
243 void SetBackgroundColor(SkColor color); 251 void SetBackgroundColor(SkColor color);
244 252
245 // Sets the visibility of the underlying compositor. 253 // Sets the visibility of the underlying compositor.
246 void SetVisible(bool visible); 254 void SetVisible(bool visible);
247 255
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 scoped_refptr<cc::AnimationTimeline> animation_timeline_; 396 scoped_refptr<cc::AnimationTimeline> animation_timeline_;
389 397
390 base::WeakPtrFactory<Compositor> weak_ptr_factory_; 398 base::WeakPtrFactory<Compositor> weak_ptr_factory_;
391 399
392 DISALLOW_COPY_AND_ASSIGN(Compositor); 400 DISALLOW_COPY_AND_ASSIGN(Compositor);
393 }; 401 };
394 402
395 } // namespace ui 403 } // namespace ui
396 404
397 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 405 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698