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

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

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/mutation_conversions.h ('k') | cc/blink/web_compositor_mutable_state_impl.h » ('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/mutation_conversions.h"
6
7 namespace cc_blink {
8
9 void convertToBlinkMutations(const cc::LayerTreeMutationMap& source,
10 blink::WebMutationMap* destination) {
11 for (const auto& iter : source) {
12 const cc::LayerTreeMutation& src_mutation = iter.second;
13 blink::WebMutation& dest_mutation = (*destination)[iter.first];
14 if (src_mutation.is_opacity_mutated())
15 dest_mutation.setOpacity(src_mutation.opacity());
16 if (src_mutation.is_scroll_left_mutated())
17 dest_mutation.setScrollLeft(src_mutation.scroll_left());
18 if (src_mutation.is_scroll_top_mutated())
19 dest_mutation.setScrollTop(src_mutation.scroll_top());
20 if (src_mutation.is_transform_mutated())
21 dest_mutation.setTransform(src_mutation.transform());
22 }
23 }
24
25 void convertFromBlinkMutations(const blink::WebMutationMap& source,
26 cc::LayerTreeMutationMap* destination) {
27 for (const auto& iter : source) {
28 const blink::WebMutation& src_mutation = iter.second;
29 cc::LayerTreeMutation& dest_mutation = (*destination)[iter.first];
30 if (src_mutation.isOpacityMutated())
31 dest_mutation.SetOpacity(src_mutation.opacity());
32 if (src_mutation.isScrollLeftMutated())
33 dest_mutation.SetScrollLeft(src_mutation.scrollLeft());
34 if (src_mutation.isScrollTopMutated())
35 dest_mutation.SetScrollTop(src_mutation.scrollTop());
36 if (src_mutation.isTransformMutated())
37 dest_mutation.SetTransform(src_mutation.transform());
38 }
39 }
40
41 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/mutation_conversions.h ('k') | cc/blink/web_compositor_mutable_state_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698