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

Side by Side Diff: cc/layers/layer_impl.h

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: Created 4 years, 1 month 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 17 matching lines...) Expand all
28 #include "cc/layers/layer_position_constraint.h" 28 #include "cc/layers/layer_position_constraint.h"
29 #include "cc/layers/performance_properties.h" 29 #include "cc/layers/performance_properties.h"
30 #include "cc/layers/render_surface_impl.h" 30 #include "cc/layers/render_surface_impl.h"
31 #include "cc/quads/shared_quad_state.h" 31 #include "cc/quads/shared_quad_state.h"
32 #include "cc/resources/resource_provider.h" 32 #include "cc/resources/resource_provider.h"
33 #include "cc/tiles/tile_priority.h" 33 #include "cc/tiles/tile_priority.h"
34 #include "cc/trees/element_id.h" 34 #include "cc/trees/element_id.h"
35 #include "cc/trees/mutator_host_client.h" 35 #include "cc/trees/mutator_host_client.h"
36 #include "cc/trees/target_property.h" 36 #include "cc/trees/target_property.h"
37 #include "third_party/skia/include/core/SkColor.h" 37 #include "third_party/skia/include/core/SkColor.h"
38 #include "third_party/skia/include/core/SkXfermode.h"
39 #include "ui/gfx/geometry/point3_f.h" 38 #include "ui/gfx/geometry/point3_f.h"
40 #include "ui/gfx/geometry/rect.h" 39 #include "ui/gfx/geometry/rect.h"
41 #include "ui/gfx/geometry/rect_f.h" 40 #include "ui/gfx/geometry/rect_f.h"
42 #include "ui/gfx/geometry/scroll_offset.h" 41 #include "ui/gfx/geometry/scroll_offset.h"
43 #include "ui/gfx/transform.h" 42 #include "ui/gfx/transform.h"
44 43
45 namespace base { 44 namespace base {
46 namespace trace_event { 45 namespace trace_event {
47 class ConvertableToTraceFormat; 46 class ConvertableToTraceFormat;
48 class TracedValue; 47 class TracedValue;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 193
195 float Opacity() const; 194 float Opacity() const;
196 const gfx::Transform& Transform() const; 195 const gfx::Transform& Transform() const;
197 196
198 void SetElementId(ElementId element_id); 197 void SetElementId(ElementId element_id);
199 ElementId element_id() const { return element_id_; } 198 ElementId element_id() const { return element_id_; }
200 199
201 void SetMutableProperties(uint32_t properties); 200 void SetMutableProperties(uint32_t properties);
202 uint32_t mutable_properties() const { return mutable_properties_; } 201 uint32_t mutable_properties() const { return mutable_properties_; }
203 202
204 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { 203 void set_draw_blend_mode(SkBlendMode blend_mode) {
205 draw_blend_mode_ = blend_mode; 204 draw_blend_mode_ = blend_mode;
206 } 205 }
207 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } 206 SkBlendMode draw_blend_mode() const { return draw_blend_mode_; }
208 207
209 void SetPosition(const gfx::PointF& position); 208 void SetPosition(const gfx::PointF& position);
210 gfx::PointF position() const { return position_; } 209 gfx::PointF position() const { return position_; }
211 210
212 bool IsAffectedByPageScale() const; 211 bool IsAffectedByPageScale() const;
213 212
214 gfx::Vector2dF FixedContainerSizeDelta() const; 213 gfx::Vector2dF FixedContainerSizeDelta() const;
215 214
216 bool Is3dSorted() const { return sorting_context_id_ != 0; } 215 bool Is3dSorted() const { return sorting_context_id_ != 0; }
217 216
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 523
525 // This is true if and only if the layer was ever ready since it last animated 524 // This is true if and only if the layer was ever ready since it last animated
526 // (all content was complete). 525 // (all content was complete).
527 bool was_ever_ready_since_last_transform_animation_ : 1; 526 bool was_ever_ready_since_last_transform_animation_ : 1;
528 527
529 Region non_fast_scrollable_region_; 528 Region non_fast_scrollable_region_;
530 Region touch_event_handler_region_; 529 Region touch_event_handler_region_;
531 SkColor background_color_; 530 SkColor background_color_;
532 SkColor safe_opaque_background_color_; 531 SkColor safe_opaque_background_color_;
533 532
534 SkXfermode::Mode draw_blend_mode_; 533 SkBlendMode draw_blend_mode_;
535 gfx::PointF position_; 534 gfx::PointF position_;
536 535
537 gfx::Rect clip_rect_in_target_space_; 536 gfx::Rect clip_rect_in_target_space_;
538 int transform_tree_index_; 537 int transform_tree_index_;
539 int effect_tree_index_; 538 int effect_tree_index_;
540 int clip_tree_index_; 539 int clip_tree_index_;
541 int scroll_tree_index_; 540 int scroll_tree_index_;
542 541
543 protected: 542 protected:
544 friend class TreeSynchronizer; 543 friend class TreeSynchronizer;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 bool has_will_change_transform_hint_ : 1; 580 bool has_will_change_transform_hint_ : 1;
582 bool needs_push_properties_ : 1; 581 bool needs_push_properties_ : 1;
583 bool scrollbars_hidden_ : 1; 582 bool scrollbars_hidden_ : 1;
584 583
585 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 584 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
586 }; 585 };
587 586
588 } // namespace cc 587 } // namespace cc
589 588
590 #endif // CC_LAYERS_LAYER_IMPL_H_ 589 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698