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

Side by Side Diff: cc/trees/layer_tree.h

Issue 2336853002: cc: Plumb device color space through to rasterization (Closed)
Patch Set: Remove damage Created 4 years, 3 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/tiles/tile_manager.cc ('k') | cc/trees/layer_tree.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 CC_TREES_LAYER_TREE_H_ 5 #ifndef CC_TREES_LAYER_TREE_H_
6 #define CC_TREES_LAYER_TREE_H_ 6 #define CC_TREES_LAYER_TREE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <unordered_set> 10 #include <unordered_set>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 #include "cc/input/event_listener_properties.h" 15 #include "cc/input/event_listener_properties.h"
16 #include "cc/input/layer_selection_bound.h" 16 #include "cc/input/layer_selection_bound.h"
17 #include "cc/layers/layer_collections.h" 17 #include "cc/layers/layer_collections.h"
18 #include "cc/layers/layer_list_iterator.h" 18 #include "cc/layers/layer_list_iterator.h"
19 #include "cc/trees/mutator_host_client.h" 19 #include "cc/trees/mutator_host_client.h"
20 #include "cc/trees/property_tree.h" 20 #include "cc/trees/property_tree.h"
21 #include "third_party/skia/include/core/SkColor.h" 21 #include "third_party/skia/include/core/SkColor.h"
22 #include "ui/gfx/color_space.h"
22 #include "ui/gfx/geometry/size.h" 23 #include "ui/gfx/geometry/size.h"
23 24
24 namespace base { 25 namespace base {
25 class TimeDelta; 26 class TimeDelta;
26 } // namespace base 27 } // namespace base
27 28
28 namespace cc { 29 namespace cc {
29 30
30 namespace proto { 31 namespace proto {
31 class LayerTree; 32 class LayerTree;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 bool use_anchor, 112 bool use_anchor,
112 float scale, 113 float scale,
113 base::TimeDelta duration); 114 base::TimeDelta duration);
114 bool HasPendingPageScaleAnimation() const; 115 bool HasPendingPageScaleAnimation() const;
115 116
116 void SetDeviceScaleFactor(float device_scale_factor); 117 void SetDeviceScaleFactor(float device_scale_factor);
117 float device_scale_factor() const { return inputs_.device_scale_factor; } 118 float device_scale_factor() const { return inputs_.device_scale_factor; }
118 119
119 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); 120 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor);
120 121
122 void SetDeviceColorSpace(const gfx::ColorSpace& device_color_space);
123 const gfx::ColorSpace& device_color_space() const {
124 return inputs_.device_color_space;
125 }
126
121 // Used externally by blink for setting the PropertyTrees when 127 // Used externally by blink for setting the PropertyTrees when
122 // |settings_.use_layer_lists| is true. This is a SPV2 setting. 128 // |settings_.use_layer_lists| is true. This is a SPV2 setting.
123 PropertyTrees* property_trees() { return &property_trees_; } 129 PropertyTrees* property_trees() { return &property_trees_; }
124 130
125 void SetNeedsDisplayOnAllLayers(); 131 void SetNeedsDisplayOnAllLayers();
126 132
127 void SetNeedsCommit(); 133 void SetNeedsCommit();
128 134
129 const LayerTreeSettings& GetSettings() const; 135 const LayerTreeSettings& GetSettings() const;
130 136
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 float top_controls_shown_ratio; 244 float top_controls_shown_ratio;
239 bool top_controls_shrink_blink_size; 245 bool top_controls_shrink_blink_size;
240 246
241 float bottom_controls_height; 247 float bottom_controls_height;
242 248
243 float device_scale_factor; 249 float device_scale_factor;
244 float painted_device_scale_factor; 250 float painted_device_scale_factor;
245 float page_scale_factor; 251 float page_scale_factor;
246 float min_page_scale_factor; 252 float min_page_scale_factor;
247 float max_page_scale_factor; 253 float max_page_scale_factor;
254 gfx::ColorSpace device_color_space;
248 255
249 SkColor background_color; 256 SkColor background_color;
250 bool has_transparent_background; 257 bool has_transparent_background;
251 258
252 LayerSelection selection; 259 LayerSelection selection;
253 260
254 gfx::Size device_viewport_size; 261 gfx::Size device_viewport_size;
255 262
256 bool have_scroll_event_handlers; 263 bool have_scroll_event_handlers;
257 EventListenerProperties event_listener_properties[static_cast<size_t>( 264 EventListenerProperties event_listener_properties[static_cast<size_t>(
(...skipping 26 matching lines...) Expand all
284 291
285 std::unique_ptr<AnimationHost> animation_host_; 292 std::unique_ptr<AnimationHost> animation_host_;
286 LayerTreeHost* layer_tree_host_; 293 LayerTreeHost* layer_tree_host_;
287 294
288 DISALLOW_COPY_AND_ASSIGN(LayerTree); 295 DISALLOW_COPY_AND_ASSIGN(LayerTree);
289 }; 296 };
290 297
291 } // namespace cc 298 } // namespace cc
292 299
293 #endif // CC_TREES_LAYER_TREE_H_ 300 #endif // CC_TREES_LAYER_TREE_H_
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | cc/trees/layer_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698