OLD | NEW |
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 Texture::~Texture() { | 314 Texture::~Texture() { |
315 } | 315 } |
316 | 316 |
317 std::string Texture::Produce() { | 317 std::string Texture::Produce() { |
318 return EmptyString(); | 318 return EmptyString(); |
319 } | 319 } |
320 | 320 |
321 CompositorLock::CompositorLock(Compositor* compositor) | 321 CompositorLock::CompositorLock(Compositor* compositor) |
322 : compositor_(compositor) { | 322 : compositor_(compositor) { |
323 MessageLoop::current()->PostDelayedTask( | 323 base::MessageLoop::current()->PostDelayedTask( |
324 FROM_HERE, | 324 FROM_HERE, |
325 base::Bind(&CompositorLock::CancelLock, AsWeakPtr()), | 325 base::Bind(&CompositorLock::CancelLock, AsWeakPtr()), |
326 base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs)); | 326 base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs)); |
327 } | 327 } |
328 | 328 |
329 CompositorLock::~CompositorLock() { | 329 CompositorLock::~CompositorLock() { |
330 CancelLock(); | 330 CancelLock(); |
331 } | 331 } |
332 | 332 |
333 void CompositorLock::CancelLock() { | 333 void CompositorLock::CancelLock() { |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 COMPOSITOR_EXPORT void DisableTestCompositor() { | 820 COMPOSITOR_EXPORT void DisableTestCompositor() { |
821 ResetImplicitFactory(); | 821 ResetImplicitFactory(); |
822 g_test_compositor_enabled = false; | 822 g_test_compositor_enabled = false; |
823 } | 823 } |
824 | 824 |
825 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { | 825 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { |
826 return g_test_compositor_enabled; | 826 return g_test_compositor_enabled; |
827 } | 827 } |
828 | 828 |
829 } // namespace ui | 829 } // namespace ui |
OLD | NEW |