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

Side by Side Diff: cc/blink/web_compositor_mutable_state_provider_impl.cc

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2015 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 "cc/blink/web_compositor_mutable_state_provider_impl.h"
6
7 #include "cc/animation/layer_tree_mutation.h"
8 #include "cc/blink/web_compositor_mutable_state_impl.h"
9 #include "cc/layers/layer_impl.h"
10 #include "cc/trees/layer_tree_impl.h"
11
12 namespace cc_blink {
13
14 WebCompositorMutableStateProviderImpl::WebCompositorMutableStateProviderImpl(
15 cc::LayerTreeImpl* state,
16 cc::LayerTreeMutationMap* mutations)
17 : state_(state), mutations_(mutations) {}
18
19 WebCompositorMutableStateProviderImpl::
20 ~WebCompositorMutableStateProviderImpl() {}
21
22 blink::WebCompositorMutableState*
23 WebCompositorMutableStateProviderImpl::getCompositorMutableStateFor(
24 uint64_t element_id) {
25 cc::LayerTreeImpl::ElementLayers layers;
26 if (!state_->GetMutableLayers(element_id, &layers))
27 return nullptr;
28
29 return new WebCompositorMutableStateImpl(&(*mutations_)[element_id],
30 layers.main, layers.scroll);
31 }
32
33 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_compositor_mutable_state_provider_impl.h ('k') | cc/blink/web_compositor_support_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698