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

Side by Side Diff: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h

Issue 22066002: Add FBO support in Android WebView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address joth's comments 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 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 #ifndef WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ 5 #ifndef WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_
6 #define WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ 6 #define WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include <vector> 10 #include <vector>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl 47 class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl
48 : public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D) { 48 : public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D) {
49 public: 49 public:
50 static scoped_ptr<WebKit::WebGraphicsContext3D> CreateViewContext( 50 static scoped_ptr<WebKit::WebGraphicsContext3D> CreateViewContext(
51 const WebKit::WebGraphicsContext3D::Attributes& attributes, 51 const WebKit::WebGraphicsContext3D::Attributes& attributes,
52 gfx::AcceleratedWidget window); 52 gfx::AcceleratedWidget window);
53 53
54 static scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext( 54 static scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext(
55 const WebKit::WebGraphicsContext3D::Attributes& attributes); 55 const WebKit::WebGraphicsContext3D::Attributes& attributes);
56 56
57 static scoped_ptr<WebKit::WebGraphicsContext3D> WrapContext(
58 scoped_ptr< ::gpu::GLInProcessContext> context,
59 const WebKit::WebGraphicsContext3D::Attributes& attributes);
60
57 virtual ~WebGraphicsContext3DInProcessCommandBufferImpl(); 61 virtual ~WebGraphicsContext3DInProcessCommandBufferImpl();
58 62
59 //---------------------------------------------------------------------- 63 //----------------------------------------------------------------------
60 // WebGraphicsContext3D methods 64 // WebGraphicsContext3D methods
61 virtual bool makeContextCurrent(); 65 virtual bool makeContextCurrent();
62 66
63 virtual int width(); 67 virtual int width();
64 virtual int height(); 68 virtual int height();
65 69
66 virtual void reshape(int width, int height); 70 virtual void reshape(int width, int height);
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 virtual void signalQuery(unsigned query, 533 virtual void signalQuery(unsigned query,
530 WebGraphicsSyncPointCallback* callback); 534 WebGraphicsSyncPointCallback* callback);
531 535
532 virtual void loseContextCHROMIUM(WGC3Denum current, WGC3Denum other); 536 virtual void loseContextCHROMIUM(WGC3Denum current, WGC3Denum other);
533 537
534 protected: 538 protected:
535 virtual GrGLInterface* onCreateGrGLInterface(); 539 virtual GrGLInterface* onCreateGrGLInterface();
536 540
537 private: 541 private:
538 WebGraphicsContext3DInProcessCommandBufferImpl( 542 WebGraphicsContext3DInProcessCommandBufferImpl(
543 scoped_ptr< ::gpu::GLInProcessContext> context,
539 const WebKit::WebGraphicsContext3D::Attributes& attributes, 544 const WebKit::WebGraphicsContext3D::Attributes& attributes,
540 bool is_offscreen, 545 bool is_offscreen,
541 gfx::AcceleratedWidget window); 546 gfx::AcceleratedWidget window);
542 547
543 // SwapBuffers callback. 548 // SwapBuffers callback.
544 void OnSwapBuffersComplete(); 549 void OnSwapBuffersComplete();
545 virtual void OnContextLost(); 550 virtual void OnContextLost();
546 551
547 bool MaybeInitializeGL(); 552 bool MaybeInitializeGL();
548 553
(...skipping 22 matching lines...) Expand all
571 576
572 // Errors raised by synthesizeGLError(). 577 // Errors raised by synthesizeGLError().
573 std::vector<WGC3Denum> synthetic_errors_; 578 std::vector<WGC3Denum> synthetic_errors_;
574 }; 579 };
575 580
576 } // namespace gpu 581 } // namespace gpu
577 } // namespace webkit 582 } // namespace webkit
578 583
579 #endif // defined(ENABLE_GPU) 584 #endif // defined(ENABLE_GPU)
580 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL _H_ 585 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698