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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/CompositorMutation.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 CompositorMutation_h 5 #ifndef CompositorMutation_h
6 #define CompositorMutation_h 6 #define CompositorMutation_h
7 7
8 #include "platform/graphics/CompositorMutableProperties.h" 8 #include "platform/graphics/CompositorMutableProperties.h"
9 #include "third_party/skia/include/core/SkMatrix44.h" 9 #include "third_party/skia/include/core/SkMatrix44.h"
10 #include "wtf/HashMap.h" 10 #include "wtf/HashMap.h"
11 #include <memory>
12 11
13 namespace blink { 12 namespace blink {
14 13
15 class CompositorMutation { 14 class CompositorMutation {
16 public: 15 public:
17 void setOpacity(float opacity) 16 void setOpacity(float opacity)
18 { 17 {
19 m_mutatedFlags |= CompositorMutableProperty::kOpacity; 18 m_mutatedFlags |= CompositorMutableProperty::kOpacity;
20 m_opacity = opacity; 19 m_opacity = opacity;
21 } 20 }
(...skipping 25 matching lines...) Expand all
47 46
48 private: 47 private:
49 uint32_t m_mutatedFlags = 0; 48 uint32_t m_mutatedFlags = 0;
50 float m_opacity = 0; 49 float m_opacity = 0;
51 float m_scrollLeft = 0; 50 float m_scrollLeft = 0;
52 float m_scrollTop = 0; 51 float m_scrollTop = 0;
53 SkMatrix44 m_transform; 52 SkMatrix44 m_transform;
54 }; 53 };
55 54
56 struct CompositorMutations { 55 struct CompositorMutations {
57 HashMap<uint64_t, std::unique_ptr<CompositorMutation>> map; 56 HashMap<uint64_t, OwnPtr<CompositorMutation>> map;
58 }; 57 };
59 58
60 } // namespace blink 59 } // namespace blink
61 60
62 #endif // CompositorMutation_h 61 #endif // CompositorMutation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698