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

Unified Diff: content/browser/android/in_process/synchronous_compositor_factory_impl.h

Issue 143023005: Support multiple service instances with GLInProcessContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
Index: content/browser/android/in_process/synchronous_compositor_factory_impl.h
diff --git a/content/browser/android/in_process/synchronous_compositor_factory_impl.h b/content/browser/android/in_process/synchronous_compositor_factory_impl.h
index 1e7987fc5a9a53340e3002ccf24d83b9de93d745..8b34f25a0daacad7ae528f9822e6a0cbbbc0d611 100644
--- a/content/browser/android/in_process/synchronous_compositor_factory_impl.h
+++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.h
@@ -9,8 +9,13 @@
#include "content/browser/android/in_process/synchronous_input_event_filter.h"
#include "content/renderer/android/synchronous_compositor_factory.h"
#include "content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h"
+#include "gpu/command_buffer/service/in_process_command_buffer.h"
#include "webkit/common/gpu/context_provider_web_context.h"
+namespace gfx {
+class GLSurface;
+}
+
namespace gpu {
class GLInProcessContext;
}
@@ -51,16 +56,20 @@ class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory {
return &synchronous_input_event_filter_;
}
+ void SetDeferredGpuService(
+ scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
void CompositorInitializedHardwareDraw();
void CompositorReleasedHardwareDraw();
+ scoped_refptr<cc::ContextProvider>
+ CreateOnscreenContextProviderForCompositorThread(
+ scoped_refptr<gfx::GLSurface> surface);
+
private:
void ReleaseGlobalHardwareResources();
bool CanCreateMainThreadContext();
scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider>
TryCreateStreamTextureFactory();
- scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl>
- CreateOffscreenContext();
SynchronousInputEventFilter synchronous_input_event_filter_;
@@ -72,8 +81,13 @@ class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory {
// This is a pointer to the context owned by
// |offscreen_context_for_main_thread_|.
gpu::GLInProcessContext* wrapped_gl_context_for_main_thread_;
+ gpu::GLInProcessContext* wrapped_gl_context_for_compositor_thread_;
scoped_refptr<cc::ContextProvider> offscreen_context_for_compositor_thread_;
+ scoped_refptr<gpu::InProcessCommandBuffer::Service> service_;
+ scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider>
+ video_context_provider_;
+
// |num_hardware_compositor_lock_| is updated on UI thread only but can be
// read on renderer main thread.
base::Lock num_hardware_compositor_lock_;

Powered by Google App Engine
This is Rietveld 408576698