| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/dom/CompositorProxiedPropertySet.h" | 5 #include "core/dom/CompositorProxiedPropertySet.h" |
| 6 | 6 |
| 7 #include "wtf/PtrUtil.h" | 7 #include "wtf/PassOwnPtr.h" |
| 8 #include <memory> | |
| 9 | 8 |
| 10 namespace blink { | 9 namespace blink { |
| 11 | 10 |
| 12 std::unique_ptr<CompositorProxiedPropertySet> CompositorProxiedPropertySet::crea
te() | 11 PassOwnPtr<CompositorProxiedPropertySet> CompositorProxiedPropertySet::create() |
| 13 { | 12 { |
| 14 return wrapUnique(new CompositorProxiedPropertySet); | 13 return adoptPtr(new CompositorProxiedPropertySet); |
| 15 } | 14 } |
| 16 | 15 |
| 17 CompositorProxiedPropertySet::CompositorProxiedPropertySet() | 16 CompositorProxiedPropertySet::CompositorProxiedPropertySet() |
| 18 { | 17 { |
| 19 memset(m_counts, 0, sizeof(m_counts)); | 18 memset(m_counts, 0, sizeof(m_counts)); |
| 20 } | 19 } |
| 21 | 20 |
| 22 CompositorProxiedPropertySet::~CompositorProxiedPropertySet() {} | 21 CompositorProxiedPropertySet::~CompositorProxiedPropertySet() {} |
| 23 | 22 |
| 24 bool CompositorProxiedPropertySet::isEmpty() const | 23 bool CompositorProxiedPropertySet::isEmpty() const |
| (...skipping 23 matching lines...) Expand all Loading... |
| 48 { | 47 { |
| 49 uint32_t properties = CompositorMutableProperty::kNone; | 48 uint32_t properties = CompositorMutableProperty::kNone; |
| 50 for (int i = 0; i < CompositorMutableProperty::kNumProperties; ++i) { | 49 for (int i = 0; i < CompositorMutableProperty::kNumProperties; ++i) { |
| 51 if (m_counts[i]) | 50 if (m_counts[i]) |
| 52 properties |= 1 << i; | 51 properties |= 1 << i; |
| 53 } | 52 } |
| 54 return properties; | 53 return properties; |
| 55 } | 54 } |
| 56 | 55 |
| 57 } // namespace blink | 56 } // namespace blink |
| OLD | NEW |