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

Side by Side Diff: ui/compositor/compositor.cc

Issue 228083002: Make ReflectorImpl use mailboxes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 DCHECK(g_context_factory); 56 DCHECK(g_context_factory);
57 return g_context_factory; 57 return g_context_factory;
58 } 58 }
59 59
60 // static 60 // static
61 void ContextFactory::SetInstance(ContextFactory* instance) { 61 void ContextFactory::SetInstance(ContextFactory* instance) {
62 DCHECK_NE(!!g_context_factory, !!instance); 62 DCHECK_NE(!!g_context_factory, !!instance);
63 g_context_factory = instance; 63 g_context_factory = instance;
64 } 64 }
65 65
66 Texture::Texture(bool flipped, const gfx::Size& size, float device_scale_factor)
67 : size_(size),
68 flipped_(flipped),
69 device_scale_factor_(device_scale_factor) {
70 }
71
72 Texture::~Texture() {
73 }
74
75 gpu::Mailbox Texture::Produce() {
76 return gpu::Mailbox();
77 }
78
79 CompositorLock::CompositorLock(Compositor* compositor) 66 CompositorLock::CompositorLock(Compositor* compositor)
80 : compositor_(compositor) { 67 : compositor_(compositor) {
81 base::MessageLoop::current()->PostDelayedTask( 68 base::MessageLoop::current()->PostDelayedTask(
82 FROM_HERE, 69 FROM_HERE,
83 base::Bind(&CompositorLock::CancelLock, AsWeakPtr()), 70 base::Bind(&CompositorLock::CancelLock, AsWeakPtr()),
84 base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs)); 71 base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs));
85 } 72 }
86 73
87 CompositorLock::~CompositorLock() { 74 CompositorLock::~CompositorLock() {
88 CancelLock(); 75 CancelLock();
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // CompositorObservers to be notified before starting another 476 // CompositorObservers to be notified before starting another
490 // draw cycle. 477 // draw cycle.
491 ScheduleDraw(); 478 ScheduleDraw();
492 } 479 }
493 FOR_EACH_OBSERVER(CompositorObserver, 480 FOR_EACH_OBSERVER(CompositorObserver,
494 observer_list_, 481 observer_list_,
495 OnCompositingEnded(this)); 482 OnCompositingEnded(this));
496 } 483 }
497 484
498 } // namespace ui 485 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698