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

Unified Diff: ui/compositor/compositor.h

Issue 21026005: aura: Remove CreateOffscreenContext from ui::ContextFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offscreencontext: clang-format Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/bench/bench_main.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.h
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 92cdd7194f80c7991e9b5c60e8d796ad8934a0f5..b9cdb82882952abe2ce0c9b1220dbf26d687723a 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -31,6 +31,7 @@ class RunLoop;
namespace cc {
class ContextProvider;
+class FakeContextProvider;
class Layer;
class LayerTreeDebugState;
class LayerTreeHost;
@@ -49,6 +50,12 @@ namespace WebKit {
class WebGraphicsContext3D;
}
+namespace webkit {
+namespace gpu {
+class ContextProviderInProcess;
+}
+}
+
namespace ui {
class Compositor;
@@ -80,10 +87,6 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
Compositor* compositor) = 0;
- // Creates a context used for offscreen rendering. This context can be shared
- // with all compositors.
- virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() = 0;
-
// Creates a reflector that copies the content of the |mirrored_compositor|
// onto |mirroing_layer|.
virtual scoped_refptr<Reflector> CreateReflector(
@@ -114,8 +117,6 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory {
// ContextFactory implementation
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
Compositor* compositor) OVERRIDE;
- virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext()
- OVERRIDE;
virtual scoped_refptr<Reflector> CreateReflector(
Compositor* compositor,
@@ -132,13 +133,9 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory {
bool Initialize();
private:
- scoped_ptr<WebKit::WebGraphicsContext3D> CreateContextCommon(
- Compositor* compositor,
- bool offscreen);
-
- scoped_refptr<ContextProviderFromContextFactory>
+ scoped_refptr<webkit::gpu::ContextProviderInProcess>
offscreen_contexts_main_thread_;
- scoped_refptr<ContextProviderFromContextFactory>
+ scoped_refptr<webkit::gpu::ContextProviderInProcess>
offscreen_contexts_compositor_thread_;
DISALLOW_COPY_AND_ASSIGN(DefaultContextFactory);
@@ -153,8 +150,6 @@ class COMPOSITOR_EXPORT TestContextFactory : public ContextFactory {
// ContextFactory implementation
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
Compositor* compositor) OVERRIDE;
- virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext()
- OVERRIDE;
virtual scoped_refptr<Reflector> CreateReflector(
Compositor* mirrored_compositor,
@@ -169,10 +164,10 @@ class COMPOSITOR_EXPORT TestContextFactory : public ContextFactory {
virtual bool DoesCreateTestContexts() OVERRIDE;
private:
- scoped_refptr<ContextProviderFromContextFactory>
- offscreen_contexts_main_thread_;
- scoped_refptr<ContextProviderFromContextFactory>
- offscreen_contexts_compositor_thread_;
+ static scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext();
+
+ scoped_refptr<cc::FakeContextProvider> offscreen_contexts_main_thread_;
+ scoped_refptr<cc::ContextProvider> offscreen_contexts_compositor_thread_;
DISALLOW_COPY_AND_ASSIGN(TestContextFactory);
};
« no previous file with comments | « ui/aura/bench/bench_main.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698