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

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

Issue 12212100: Provide shared context to Platform API in renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseforreals Created 7 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 | Annotate | Revision Log
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | webkit/gpu/context_provider_in_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698