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

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

Issue 2336853002: cc: Plumb device color space through to rasterization (Closed)
Patch Set: Use suggested approach 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 bool use_anchor, 110 bool use_anchor,
110 float scale, 111 float scale,
111 base::TimeDelta duration); 112 base::TimeDelta duration);
112 bool HasPendingPageScaleAnimation() const; 113 bool HasPendingPageScaleAnimation() const;
113 114
114 void SetDeviceScaleFactor(float device_scale_factor); 115 void SetDeviceScaleFactor(float device_scale_factor);
115 float device_scale_factor() const { return inputs_.device_scale_factor; } 116 float device_scale_factor() const { return inputs_.device_scale_factor; }
116 117
117 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); 118 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor);
118 119
120 void SetDeviceColorSpace(const gfx::ColorSpace& device_color_space);
121 const gfx::ColorSpace& device_color_space() const {
122 return inputs_.device_color_space;
123 }
124
119 // Used externally by blink for setting the PropertyTrees when 125 // Used externally by blink for setting the PropertyTrees when
120 // |settings_.use_layer_lists| is true. This is a SPV2 setting. 126 // |settings_.use_layer_lists| is true. This is a SPV2 setting.
121 PropertyTrees* property_trees() { return &property_trees_; } 127 PropertyTrees* property_trees() { return &property_trees_; }
122 128
123 void SetNeedsDisplayOnAllLayers(); 129 void SetNeedsDisplayOnAllLayers();
124 130
125 UIResourceManager* GetUIResourceManager() const; 131 UIResourceManager* GetUIResourceManager() const;
126 const LayerTreeSettings& GetSettings() const; 132 const LayerTreeSettings& GetSettings() const;
127 133
128 // Methods which should only be used internally in cc ------------------ 134 // Methods which should only be used internally in cc ------------------
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 float top_controls_shown_ratio; 240 float top_controls_shown_ratio;
235 bool top_controls_shrink_blink_size; 241 bool top_controls_shrink_blink_size;
236 242
237 float bottom_controls_height; 243 float bottom_controls_height;
238 244
239 float device_scale_factor; 245 float device_scale_factor;
240 float painted_device_scale_factor; 246 float painted_device_scale_factor;
241 float page_scale_factor; 247 float page_scale_factor;
242 float min_page_scale_factor; 248 float min_page_scale_factor;
243 float max_page_scale_factor; 249 float max_page_scale_factor;
250 gfx::ColorSpace device_color_space;
244 251
245 SkColor background_color; 252 SkColor background_color;
246 bool has_transparent_background; 253 bool has_transparent_background;
247 254
248 LayerSelection selection; 255 LayerSelection selection;
249 256
250 gfx::Size device_viewport_size; 257 gfx::Size device_viewport_size;
251 258
252 bool have_scroll_event_handlers; 259 bool have_scroll_event_handlers;
253 EventListenerProperties event_listener_properties[static_cast<size_t>( 260 EventListenerProperties event_listener_properties[static_cast<size_t>(
(...skipping 26 matching lines...) Expand all
280 287
281 std::unique_ptr<AnimationHost> animation_host_; 288 std::unique_ptr<AnimationHost> animation_host_;
282 LayerTreeHost* layer_tree_host_; 289 LayerTreeHost* layer_tree_host_;
283 290
284 DISALLOW_COPY_AND_ASSIGN(LayerTree); 291 DISALLOW_COPY_AND_ASSIGN(LayerTree);
285 }; 292 };
286 293
287 } // namespace cc 294 } // namespace cc
288 295
289 #endif // CC_TREES_LAYER_TREE_H_ 296 #endif // CC_TREES_LAYER_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698