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

Side by Side Diff: content/browser/renderer_host/resize_lock.cc

Issue 2773433003: Fix CompositorResizeLock to do something. (Closed)
Patch Set: resizelock: observer-rebase Created 3 years, 8 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 | « content/browser/renderer_host/resize_lock.h ('k') | content/test/BUILD.gn » ('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 2014 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 "content/browser/renderer_host/resize_lock.h"
6
7 namespace content {
8
9 ResizeLock::ResizeLock(const gfx::Size new_size, bool defer_compositor_lock)
10 : new_size_(new_size), defer_compositor_lock_(defer_compositor_lock) {
11 if (!defer_compositor_lock_)
12 LockCompositor();
13 }
14
15 ResizeLock::~ResizeLock() {
16 UnlockCompositor();
17 }
18
19 bool ResizeLock::GrabDeferredLock() {
20 if (!defer_compositor_lock_)
21 return false;
22 LockCompositor();
23 return true;
24 }
25
26 void ResizeLock::UnlockCompositor() {
27 defer_compositor_lock_ = false;
28 }
29
30 void ResizeLock::LockCompositor() {
31 defer_compositor_lock_ = false;
32 }
33
34 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resize_lock.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698