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

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

Issue 1447893002: compositor-worker: Introduce WebCompositorMutableState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback. 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
« no previous file with comments | « cc/blink/web_compositor_mutable_state_provider_impl.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/blink/web_compositor_mutable_state_impl.h"
8 #include "cc/layers/layer_impl.h"
9 #include "cc/trees/layer_tree_impl.h"
10
11 namespace cc_blink {
12
13 WebCompositorMutableStateProviderImpl::WebCompositorMutableStateProviderImpl(
14 cc::LayerTreeImpl* state,
15 cc::LayerTreeMutationMap* mutations)
16 : state_(state), mutations_(mutations) {}
17
18 WebCompositorMutableStateProviderImpl::
19 ~WebCompositorMutableStateProviderImpl() {}
20
21 blink::WebPassOwnPtr<blink::WebCompositorMutableState>
22 WebCompositorMutableStateProviderImpl::getMutableStateFor(uint64_t element_id) {
23 cc::LayerTreeImpl::ElementLayers layers =
24 state_->GetMutableLayers(element_id);
25
26 if (!layers.main && !layers.scroll)
27 return nullptr;
28
29 return blink::adoptWebPtr<blink::WebCompositorMutableState>(
30 new WebCompositorMutableStateImpl(&(*mutations_)[element_id], layers.main,
31 layers.scroll));
32 }
33
34 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_compositor_mutable_state_provider_impl.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698