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

Side by Side Diff: chrome/renderer/webgraphicscontext3d_command_buffer_impl.h

Issue 2864021: Adding a new signature for WebGraphicsContext3DCommandBufferImpl::initialize(... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
« no previous file with comments | « no previous file | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 5 #ifndef CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
6 #define CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 6 #define CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "chrome/renderer/ggl/ggl.h" 13 #include "chrome/renderer/ggl/ggl.h"
14 #include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h" 14 #include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h"
15 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" 15 #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
16 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
16 17
17 #if !defined(OS_MACOSX) 18 #if !defined(OS_MACOSX)
18 #define FLIP_FRAMEBUFFER_VERTICALLY 19 #define FLIP_FRAMEBUFFER_VERTICALLY
19 #endif 20 #endif
20 21
21 class GpuChannelHost; 22 class GpuChannelHost;
22 class CommandBufferProxy; 23 class CommandBufferProxy;
23 24
24 namespace gpu { 25 namespace gpu {
25 namespace gles2 { 26 namespace gles2 {
26 class GLES2Implementation; 27 class GLES2Implementation;
27 } 28 }
28 } 29 }
29 30
30 using WebKit::WebGLId; 31 using WebKit::WebGLId;
31 32
32 class WebGraphicsContext3DCommandBufferImpl 33 class WebGraphicsContext3DCommandBufferImpl
33 : public WebKit::WebGraphicsContext3D { 34 : public WebKit::WebGraphicsContext3D {
34 public: 35 public:
35 36
36 WebGraphicsContext3DCommandBufferImpl(); 37 WebGraphicsContext3DCommandBufferImpl();
37 virtual ~WebGraphicsContext3DCommandBufferImpl(); 38 virtual ~WebGraphicsContext3DCommandBufferImpl();
38 39
39 //---------------------------------------------------------------------- 40 //----------------------------------------------------------------------
40 // WebGraphicsContext3D methods 41 // WebGraphicsContext3D methods
42 // TODO(vangelis): Remove this version of initialize() once the changes
43 // to WebGraphicsContext3D have been checked in upstream.
41 virtual bool initialize(WebGraphicsContext3D::Attributes attributes); 44 virtual bool initialize(WebGraphicsContext3D::Attributes attributes);
45 virtual bool initialize(WebGraphicsContext3D::Attributes attributes,
46 WebKit::WebView*);
47
42 virtual bool makeContextCurrent(); 48 virtual bool makeContextCurrent();
43 49
44 virtual int width(); 50 virtual int width();
45 virtual int height(); 51 virtual int height();
46 52
47 virtual int sizeInBytes(int type); 53 virtual int sizeInBytes(int type);
48 54
49 virtual bool isGLES2Compliant(); 55 virtual bool isGLES2Compliant();
50 56
51 virtual void reshape(int width, int height); 57 virtual void reshape(int width, int height);
52 58
53 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size); 59 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size);
54 60
61 virtual unsigned int getPlatformTextureId();
62 virtual void prepareTexture();
63
55 virtual void activeTexture(unsigned long texture); 64 virtual void activeTexture(unsigned long texture);
56 virtual void attachShader(WebGLId program, WebGLId shader); 65 virtual void attachShader(WebGLId program, WebGLId shader);
57 virtual void bindAttribLocation(WebGLId program, unsigned long index, 66 virtual void bindAttribLocation(WebGLId program, unsigned long index,
58 const char* name); 67 const char* name);
59 virtual void bindBuffer(unsigned long target, WebGLId buffer); 68 virtual void bindBuffer(unsigned long target, WebGLId buffer);
60 virtual void bindFramebuffer(unsigned long target, WebGLId framebuffer); 69 virtual void bindFramebuffer(unsigned long target, WebGLId framebuffer);
61 virtual void bindRenderbuffer(unsigned long target, WebGLId renderbuffer); 70 virtual void bindRenderbuffer(unsigned long target, WebGLId renderbuffer);
62 virtual void bindTexture(unsigned long target, WebGLId texture); 71 virtual void bindTexture(unsigned long target, WebGLId texture);
63 virtual void blendColor(double red, double green, 72 virtual void blendColor(double red, double green,
64 double blue, double alpha); 73 double blue, double alpha);
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 scoped_ptr<uint8> scanline_; 351 scoped_ptr<uint8> scanline_;
343 void FlipVertically(uint8* framebuffer, 352 void FlipVertically(uint8* framebuffer,
344 unsigned int width, 353 unsigned int width,
345 unsigned int height); 354 unsigned int height);
346 #endif 355 #endif
347 }; 356 };
348 357
349 #endif // defined(ENABLE_GPU) 358 #endif // defined(ENABLE_GPU)
350 #endif // CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 359 #endif // CHROME_RENDERER_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
351 360
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698