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

Unified Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h

Issue 14048018: Add create WGC3DInProcessCommandBuffer for on-screen context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
index 22cd3b373aa46faedaef39876edc23a071f48685..0d5c177f7ad20fd517d04ff90b2d478aea7a10c9 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h
@@ -45,9 +45,15 @@ class GLInProcessContext;
class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl
: public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D) {
public:
+ static WebGraphicsContext3DInProcessCommandBufferImpl*
+ CreateViewContext(
+ const WebKit::WebGraphicsContext3D::Attributes& attributes,
+ gfx::AcceleratedWidget window);
+
+ static WebGraphicsContext3DInProcessCommandBufferImpl*
+ CreateOffscreenContext(
+ const WebKit::WebGraphicsContext3D::Attributes& attributes);
- explicit WebGraphicsContext3DInProcessCommandBufferImpl(
- const WebKit::WebGraphicsContext3D::Attributes& attributes);
virtual ~WebGraphicsContext3DInProcessCommandBufferImpl();
//----------------------------------------------------------------------
@@ -526,6 +532,11 @@ class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl
virtual GrGLInterface* onCreateGrGLInterface();
private:
+ WebGraphicsContext3DInProcessCommandBufferImpl(
+ const WebKit::WebGraphicsContext3D::Attributes& attributes,
+ bool is_offscreen,
+ gfx::AcceleratedWidget window);
+
// SwapBuffers callback.
void OnSwapBuffersComplete();
virtual void OnContextLost();
@@ -536,6 +547,11 @@ class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl
// instead of going through WebGraphicsContext3D.
void ClearContext();
+
+ bool is_offscreen_;
+ // Only used when not offscreen.
+ gfx::AcceleratedWidget window_;
+
bool initialized_;
bool initialize_failed_;

Powered by Google App Engine
This is Rietveld 408576698