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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/CompositorMutableState.cpp

Issue 2018833002: cc : Delete LayerImpl::opacity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 #include "platform/graphics/CompositorMutableState.h" 5 #include "platform/graphics/CompositorMutableState.h"
6 6
7 #include "cc/layers/layer_impl.h" 7 #include "cc/layers/layer_impl.h"
8 #include "cc/trees/layer_tree_impl.h" 8 #include "cc/trees/layer_tree_impl.h"
9 #include "platform/graphics/CompositorMutation.h" 9 #include "platform/graphics/CompositorMutation.h"
10 10
11 namespace blink { 11 namespace blink {
12 CompositorMutableState::CompositorMutableState(CompositorMutation* mutation, cc: :LayerImpl* main, cc::LayerImpl* scroll) 12 CompositorMutableState::CompositorMutableState(CompositorMutation* mutation, cc: :LayerImpl* main, cc::LayerImpl* scroll)
13 : m_mutation(mutation) 13 : m_mutation(mutation)
14 , m_mainLayer(main) 14 , m_mainLayer(main)
15 , m_scrollLayer(scroll) 15 , m_scrollLayer(scroll)
16 { 16 {
17 } 17 }
18 18
19 CompositorMutableState::~CompositorMutableState() {} 19 CompositorMutableState::~CompositorMutableState() {}
20 20
21 double CompositorMutableState::opacity() const 21 double CompositorMutableState::opacity() const
22 { 22 {
23 return m_mainLayer->opacity(); 23 return m_mainLayer->Opacity();
24 } 24 }
25 25
26 void CompositorMutableState::setOpacity(double opacity) 26 void CompositorMutableState::setOpacity(double opacity)
27 { 27 {
28 if (!m_mainLayer) 28 if (!m_mainLayer)
29 return; 29 return;
30 m_mainLayer->OnOpacityAnimated(opacity); 30 m_mainLayer->OnOpacityAnimated(opacity);
31 m_mutation->setOpacity(opacity); 31 m_mutation->setOpacity(opacity);
32 } 32 }
33 33
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 { 69 {
70 if (!m_scrollLayer) 70 if (!m_scrollLayer)
71 return; 71 return;
72 gfx::ScrollOffset offset = m_scrollLayer->CurrentScrollOffset(); 72 gfx::ScrollOffset offset = m_scrollLayer->CurrentScrollOffset();
73 offset.set_y(scrollTop); 73 offset.set_y(scrollTop);
74 m_scrollLayer->OnScrollOffsetAnimated(offset); 74 m_scrollLayer->OnScrollOffsetAnimated(offset);
75 m_mutation->setScrollTop(scrollTop); 75 m_mutation->setScrollTop(scrollTop);
76 } 76 }
77 77
78 } // namespace blink 78 } // namespace blink
OLDNEW
« no previous file with comments | « cc/trees/tree_synchronizer_unittest.cc ('k') | third_party/WebKit/Source/platform/graphics/CompositorMutableStateTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698