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

Side by Side Diff: cc/base/swap_promise_monitor.cc

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/base/swap_promise_monitor.h ('k') | cc/cc.gyp » ('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 2013 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 "base/logging.h"
6 #include "cc/base/swap_promise_monitor.h"
7 #include "cc/trees/layer_tree_host.h"
8 #include "cc/trees/layer_tree_host_impl.h"
9
10 namespace cc {
11
12 SwapPromiseMonitor::SwapPromiseMonitor(LayerTreeHost* layer_tree_host,
13 LayerTreeHostImpl* layer_tree_host_impl)
14 : layer_tree_host_(layer_tree_host),
15 layer_tree_host_impl_(layer_tree_host_impl) {
16 DCHECK((layer_tree_host && !layer_tree_host_impl) ||
17 (!layer_tree_host && layer_tree_host_impl));
18 if (layer_tree_host_)
19 layer_tree_host_->InsertSwapPromiseMonitor(this);
20 if (layer_tree_host_impl_)
21 layer_tree_host_impl_->InsertSwapPromiseMonitor(this);
22 }
23
24 SwapPromiseMonitor::~SwapPromiseMonitor() {
25 if (layer_tree_host_)
26 layer_tree_host_->RemoveSwapPromiseMonitor(this);
27 if (layer_tree_host_impl_)
28 layer_tree_host_impl_->RemoveSwapPromiseMonitor(this);
29 }
30
31 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/swap_promise_monitor.h ('k') | cc/cc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698