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

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

Issue 1599673002: compositor-worker: Remove code from cc_blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attempt to fix build issue by updating dependencies of blink_platform_unittests. Created 4 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "platform/graphics/CompositorMutableStateProvider.h"
6
7 #include "cc/layers/layer_impl.h"
8 #include "cc/trees/layer_tree_impl.h"
9 #include "platform/graphics/CompositorMutableState.h"
10 #include "platform/graphics/CompositorMutation.h"
11 #include "wtf/PassOwnPtr.h"
12
13 namespace blink {
14
15 CompositorMutableStateProvider::CompositorMutableStateProvider(cc::LayerTreeImpl * state, CompositorMutations* mutations)
16 : m_state(state)
17 , m_mutations(mutations)
18 {
19 }
20
21 CompositorMutableStateProvider::~CompositorMutableStateProvider() {}
22
23 PassOwnPtr<CompositorMutableState>
24 CompositorMutableStateProvider::getMutableStateFor(uint64_t element_id)
25 {
26 cc::LayerTreeImpl::ElementLayers layers = m_state->GetMutableLayers(element_ id);
27
28 if (!layers.main && !layers.scroll)
29 return nullptr;
30
31 return adoptPtr<blink::CompositorMutableState>(
jbroman 2016/01/18 19:07:22 You shouldn't need to supply the template argument
Ian Vollick 2016/01/18 21:25:04 Done.
32 new CompositorMutableState(&m_mutations->map[element_id], layers.main, l ayers.scroll));
33 }
34
35 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698