| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 DISALLOW_COPY_AND_ASSIGN(PendingSwap); | 73 DISALLOW_COPY_AND_ASSIGN(PendingSwap); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 class NullContextProvider : public cc::ContextProvider { | 76 class NullContextProvider : public cc::ContextProvider { |
| 77 public: | 77 public: |
| 78 virtual bool InitializeOnMainThread() OVERRIDE { return false; } | 78 virtual bool InitializeOnMainThread() OVERRIDE { return false; } |
| 79 virtual bool BindToCurrentThread() OVERRIDE { return false; } | 79 virtual bool BindToCurrentThread() OVERRIDE { return false; } |
| 80 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE { return NULL; } | 80 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE { return NULL; } |
| 81 virtual class GrContext* GrContext() OVERRIDE { return NULL; } | 81 virtual class GrContext* GrContext() OVERRIDE { return NULL; } |
| 82 virtual void VerifyContexts() OVERRIDE {} | 82 virtual void VerifyContexts() OVERRIDE {} |
| 83 virtual bool DestroyedOnMainThread() OVERRIDE { return false; } |
| 83 | 84 |
| 84 protected: | 85 protected: |
| 85 virtual ~NullContextProvider() {} | 86 virtual ~NullContextProvider() {} |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 struct MainThreadNullContextProvider { | 89 struct MainThreadNullContextProvider { |
| 89 scoped_refptr<NullContextProvider> provider; | 90 scoped_refptr<NullContextProvider> provider; |
| 90 | 91 |
| 91 static MainThreadNullContextProvider* GetInstance() { | 92 static MainThreadNullContextProvider* GetInstance() { |
| 92 return Singleton<MainThreadNullContextProvider>::get(); | 93 return Singleton<MainThreadNullContextProvider>::get(); |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 691 |
| 691 COMPOSITOR_EXPORT void DisableTestCompositor() { | 692 COMPOSITOR_EXPORT void DisableTestCompositor() { |
| 692 g_test_compositor_enabled = false; | 693 g_test_compositor_enabled = false; |
| 693 } | 694 } |
| 694 | 695 |
| 695 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { | 696 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { |
| 696 return g_test_compositor_enabled; | 697 return g_test_compositor_enabled; |
| 697 } | 698 } |
| 698 | 699 |
| 699 } // namespace ui | 700 } // namespace ui |
| OLD | NEW |