OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef Extensions3DChromium_h | 26 #ifndef Extensions3DChromium_h |
27 #define Extensions3DChromium_h | 27 #define Extensions3DChromium_h |
28 | 28 |
29 #include "Extensions3D.h" | 29 #include "Extensions3D.h" |
30 | 30 |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 class GraphicsContext3DInternal; | 33 class GraphicsContext3DInternal; |
| 34 class ImageBuffer; |
34 | 35 |
35 class Extensions3DChromium : public Extensions3D { | 36 class Extensions3DChromium : public Extensions3D { |
36 public: | 37 public: |
37 virtual ~Extensions3DChromium(); | 38 virtual ~Extensions3DChromium(); |
38 | 39 |
39 // Supported extensions: | 40 // Supported extensions: |
40 // GL_CHROMIUM_resource_safe : indicating that textures/renderbuffers are
always initialized before read/write. | 41 // GL_CHROMIUM_resource_safe : indicating that textures/renderbuffers are
always initialized before read/write. |
41 // GL_CHROMIUM_strict_attribs : indicating a GL error is generated for out
-of-bounds buffer accesses. | 42 // GL_CHROMIUM_strict_attribs : indicating a GL error is generated for out
-of-bounds buffer accesses. |
42 // GL_CHROMIUM_map_sub | 43 // GL_CHROMIUM_map_sub |
43 // GL_CHROMIUM_copy_texture_to_parent_texture | 44 // GL_CHROMIUM_copy_texture_to_parent_texture |
44 // GL_CHROMIUM_latch | 45 // GL_CHROMIUM_latch |
45 // GL_CHROMIUM_swapbuffers_complete_callback | 46 // GL_CHROMIUM_swapbuffers_complete_callback |
46 // GL_CHROMIUM_rate_limit_offscreen_context | 47 // GL_CHROMIUM_rate_limit_offscreen_context |
| 48 // GL_CHROMIUM_paint_framebuffer_canvas |
47 | 49 |
48 // Extensions3D methods. | 50 // Extensions3D methods. |
49 virtual bool supports(const String&); | 51 virtual bool supports(const String&); |
50 virtual void ensureEnabled(const String&); | 52 virtual void ensureEnabled(const String&); |
51 virtual bool isEnabled(const String&); | 53 virtual bool isEnabled(const String&); |
52 virtual int getGraphicsResetStatusARB(); | 54 virtual int getGraphicsResetStatusARB(); |
53 virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1,
long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned lo
ng filter); | 55 virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1,
long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned lo
ng filter); |
54 virtual void renderbufferStorageMultisample(unsigned long target, unsigned l
ong samples, unsigned long internalformat, unsigned long width, unsigned long he
ight); | 56 virtual void renderbufferStorageMultisample(unsigned long target, unsigned l
ong samples, unsigned long internalformat, unsigned long width, unsigned long he
ight); |
55 virtual Platform3DObject createVertexArrayOES(); | 57 virtual Platform3DObject createVertexArrayOES(); |
56 virtual void deleteVertexArrayOES(Platform3DObject); | 58 virtual void deleteVertexArrayOES(Platform3DObject); |
(...skipping 25 matching lines...) Expand all Loading... |
82 class SwapBuffersCompleteCallbackCHROMIUM { | 84 class SwapBuffersCompleteCallbackCHROMIUM { |
83 public: | 85 public: |
84 virtual void onSwapBuffersComplete() = 0; | 86 virtual void onSwapBuffersComplete() = 0; |
85 virtual ~SwapBuffersCompleteCallbackCHROMIUM() { } | 87 virtual ~SwapBuffersCompleteCallbackCHROMIUM() { } |
86 }; | 88 }; |
87 void setSwapBuffersCompleteCallbackCHROMIUM(PassOwnPtr<SwapBuffersCompleteCa
llbackCHROMIUM>); | 89 void setSwapBuffersCompleteCallbackCHROMIUM(PassOwnPtr<SwapBuffersCompleteCa
llbackCHROMIUM>); |
88 | 90 |
89 // GL_CHROMIUM_rate_limit_offscreen_context | 91 // GL_CHROMIUM_rate_limit_offscreen_context |
90 void rateLimitOffscreenContextCHROMIUM(); | 92 void rateLimitOffscreenContextCHROMIUM(); |
91 | 93 |
| 94 // GL_CHROMIUM_paint_framebuffer_canvas |
| 95 void paintFramebufferToCanvas(int framebuffer, int width, int height, bool p
remultiplyAlpha, ImageBuffer*); |
| 96 |
92 private: | 97 private: |
93 // Instances of this class are strictly owned by the GraphicsContext3D imple
mentation and do not | 98 // Instances of this class are strictly owned by the GraphicsContext3D imple
mentation and do not |
94 // need to be instantiated by any other code. | 99 // need to be instantiated by any other code. |
95 friend class GraphicsContext3DInternal; | 100 friend class GraphicsContext3DInternal; |
96 explicit Extensions3DChromium(GraphicsContext3DInternal*); | 101 explicit Extensions3DChromium(GraphicsContext3DInternal*); |
97 | 102 |
98 // Weak pointer back to GraphicsContext3DInternal | 103 // Weak pointer back to GraphicsContext3DInternal |
99 GraphicsContext3DInternal* m_internal; | 104 GraphicsContext3DInternal* m_internal; |
100 }; | 105 }; |
101 | 106 |
102 } // namespace WebCore | 107 } // namespace WebCore |
103 | 108 |
104 #endif // Extensions3DChromium_h | 109 #endif // Extensions3DChromium_h |
OLD | NEW |