OLD | NEW |
---|---|
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 #include "platform/graphics/paint/EffectPaintPropertyNode.h" | 5 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
6 | 6 |
7 #include "platform/graphics/paint/PropertyTreeState.h" | 7 #include "platform/graphics/paint/PropertyTreeState.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... | |
29 cc::Layer* EffectPaintPropertyNode::EnsureDummyLayer() const { | 29 cc::Layer* EffectPaintPropertyNode::EnsureDummyLayer() const { |
30 if (dummy_layer_) | 30 if (dummy_layer_) |
31 return dummy_layer_.get(); | 31 return dummy_layer_.get(); |
32 dummy_layer_ = cc::Layer::Create(); | 32 dummy_layer_ = cc::Layer::Create(); |
33 return dummy_layer_.get(); | 33 return dummy_layer_.get(); |
34 } | 34 } |
35 | 35 |
36 String EffectPaintPropertyNode::ToString() const { | 36 String EffectPaintPropertyNode::ToString() const { |
37 return String::Format( | 37 return String::Format( |
38 "parent=%p localTransformSpace=%p outputClip=%p opacity=%f filter=%s " | 38 "parent=%p localTransformSpace=%p outputClip=%p opacity=%f filter=%s " |
39 "blendMode=%s directCompositingReasons=%s compositorElementId=(%d, %d) " | 39 "blendMode=%s directCompositingReasons=%s compositorElementId=%lu " |
40 "paintOffset=%s", | 40 "paintOffset=%s", |
41 parent_.Get(), local_transform_space_.Get(), output_clip_.Get(), opacity_, | 41 parent_.Get(), local_transform_space_.Get(), output_clip_.Get(), opacity_, |
42 filter_.ToString().Ascii().data(), SkBlendMode_Name(blend_mode_), | 42 filter_.ToString().Ascii().data(), SkBlendMode_Name(blend_mode_), |
43 CompositingReasonsAsString(direct_compositing_reasons_).Ascii().data(), | 43 CompositingReasonsAsString(direct_compositing_reasons_).Ascii().data(), |
44 compositor_element_id_.primaryId, compositor_element_id_.secondaryId, | 44 static_cast<unsigned long>(compositor_element_id_.id), |
suzyh_UTC10 (ex-contributor)
2017/05/08 01:04:15
Is this cast necessary? Is it not possible to spec
chrishtr
2017/05/08 16:32:13
Yes it is, sadly. I ran in to some annoying compil
| |
45 paint_offset_.ToString().Ascii().data()); | 45 paint_offset_.ToString().Ascii().data()); |
46 } | 46 } |
47 | 47 |
48 #if DCHECK_IS_ON() | 48 #if DCHECK_IS_ON() |
49 | 49 |
50 String EffectPaintPropertyNode::ToTreeString() const { | 50 String EffectPaintPropertyNode::ToTreeString() const { |
51 return blink::PropertyTreeStatePrinter<blink::EffectPaintPropertyNode>() | 51 return blink::PropertyTreeStatePrinter<blink::EffectPaintPropertyNode>() |
52 .PathAsString(this); | 52 .PathAsString(this); |
53 } | 53 } |
54 | 54 |
55 #endif | 55 #endif |
56 | 56 |
57 } // namespace blink | 57 } // namespace blink |
OLD | NEW |