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

Side by Side Diff: cc/quads/shared_quad_state.cc

Issue 2029813002: cc::SharedQuadState: drop CopyFrom and add copy constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use = default in cc Created 4 years, 6 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/quads/shared_quad_state.h ('k') | cc/surfaces/surface_aggregator.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "cc/quads/shared_quad_state.h" 5 #include "cc/quads/shared_quad_state.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "base/trace_event/trace_event_argument.h" 8 #include "base/trace_event/trace_event_argument.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
11 #include "cc/debug/traced_value.h" 11 #include "cc/debug/traced_value.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 SharedQuadState::SharedQuadState() 15 SharedQuadState::SharedQuadState()
16 : is_clipped(false), 16 : is_clipped(false),
17 opacity(0.f), 17 opacity(0.f),
18 blend_mode(SkXfermode::kSrcOver_Mode), 18 blend_mode(SkXfermode::kSrcOver_Mode),
19 sorting_context_id(0) { 19 sorting_context_id(0) {
20 } 20 }
21 21
22 SharedQuadState::SharedQuadState(const SharedQuadState& other) = default;
23
22 SharedQuadState::~SharedQuadState() { 24 SharedQuadState::~SharedQuadState() {
23 TRACE_EVENT_OBJECT_DELETED_WITH_ID( 25 TRACE_EVENT_OBJECT_DELETED_WITH_ID(
24 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"), 26 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"),
25 "cc::SharedQuadState", this); 27 "cc::SharedQuadState", this);
26 } 28 }
27 29
28 void SharedQuadState::CopyFrom(const SharedQuadState* other) {
29 *this = *other;
30 }
31
32 void SharedQuadState::SetAll(const gfx::Transform& quad_to_target_transform, 30 void SharedQuadState::SetAll(const gfx::Transform& quad_to_target_transform,
33 const gfx::Size& quad_layer_bounds, 31 const gfx::Size& quad_layer_bounds,
34 const gfx::Rect& visible_quad_layer_rect, 32 const gfx::Rect& visible_quad_layer_rect,
35 const gfx::Rect& clip_rect, 33 const gfx::Rect& clip_rect,
36 bool is_clipped, 34 bool is_clipped,
37 float opacity, 35 float opacity,
38 SkXfermode::Mode blend_mode, 36 SkXfermode::Mode blend_mode,
39 int sorting_context_id) { 37 int sorting_context_id) {
40 this->quad_to_target_transform = quad_to_target_transform; 38 this->quad_to_target_transform = quad_to_target_transform;
41 this->quad_layer_bounds = quad_layer_bounds; 39 this->quad_layer_bounds = quad_layer_bounds;
(...skipping 18 matching lines...) Expand all
60 value->SetDouble("opacity", opacity); 58 value->SetDouble("opacity", opacity);
61 value->SetString("blend_mode", SkXfermode::ModeName(blend_mode)); 59 value->SetString("blend_mode", SkXfermode::ModeName(blend_mode));
62 TracedValue::MakeDictIntoImplicitSnapshotWithCategory( 60 TracedValue::MakeDictIntoImplicitSnapshotWithCategory(
63 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"), 61 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"),
64 value, 62 value,
65 "cc::SharedQuadState", 63 "cc::SharedQuadState",
66 this); 64 this);
67 } 65 }
68 66
69 } // namespace cc 67 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/shared_quad_state.h ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698