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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h

Issue 7671031: Merge 92520 - [chromium] Accelerated canvas breaks when moving canvases or resources between Pages (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 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
OLDNEW
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 23 matching lines...) Expand all
34 class ImageBuffer; 34 class ImageBuffer;
35 35
36 class Extensions3DChromium : public Extensions3D { 36 class Extensions3DChromium : public Extensions3D {
37 public: 37 public:
38 virtual ~Extensions3DChromium(); 38 virtual ~Extensions3DChromium();
39 39
40 // Supported extensions: 40 // Supported extensions:
41 // 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.
42 // 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.
43 // GL_CHROMIUM_map_sub 43 // GL_CHROMIUM_map_sub
44 // GL_CHROMIUM_copy_texture_to_parent_texture
45 // GL_CHROMIUM_swapbuffers_complete_callback 44 // GL_CHROMIUM_swapbuffers_complete_callback
46 // GL_CHROMIUM_rate_limit_offscreen_context 45 // GL_CHROMIUM_rate_limit_offscreen_context
47 // GL_CHROMIUM_paint_framebuffer_canvas 46 // GL_CHROMIUM_paint_framebuffer_canvas
48 47
49 // Extensions3D methods. 48 // Extensions3D methods.
50 virtual bool supports(const String&); 49 virtual bool supports(const String&);
51 virtual void ensureEnabled(const String&); 50 virtual void ensureEnabled(const String&);
52 virtual bool isEnabled(const String&); 51 virtual bool isEnabled(const String&);
53 virtual int getGraphicsResetStatusARB(); 52 virtual int getGraphicsResetStatusARB();
54 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); 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 renderbufferStorageMultisample(unsigned long target, unsigned l ong samples, unsigned long internalformat, unsigned long width, unsigned long he ight); 54 virtual void renderbufferStorageMultisample(unsigned long target, unsigned l ong samples, unsigned long internalformat, unsigned long width, unsigned long he ight);
56 virtual Platform3DObject createVertexArrayOES(); 55 virtual Platform3DObject createVertexArrayOES();
57 virtual void deleteVertexArrayOES(Platform3DObject); 56 virtual void deleteVertexArrayOES(Platform3DObject);
58 virtual GC3Dboolean isVertexArrayOES(Platform3DObject); 57 virtual GC3Dboolean isVertexArrayOES(Platform3DObject);
59 virtual void bindVertexArrayOES(Platform3DObject); 58 virtual void bindVertexArrayOES(Platform3DObject);
60 59
61 enum { 60 enum {
62 // GL_CHROMIUM_map_sub (enums inherited from GL_ARB_vertex_buffer_object ) 61 // GL_CHROMIUM_map_sub (enums inherited from GL_ARB_vertex_buffer_object )
63 READ_ONLY = 0x88B8, 62 READ_ONLY = 0x88B8,
64 WRITE_ONLY = 0x88B9 63 WRITE_ONLY = 0x88B9
65 }; 64 };
66 65
67 // GL_CHROMIUM_map_sub 66 // GL_CHROMIUM_map_sub
68 void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsign ed access); 67 void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsign ed access);
69 void unmapBufferSubDataCHROMIUM(const void*); 68 void unmapBufferSubDataCHROMIUM(const void*);
70 void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access) ; 69 void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access) ;
71 void unmapTexSubImage2DCHROMIUM(const void*); 70 void unmapTexSubImage2DCHROMIUM(const void*);
72 71
73 // GL_CHROMIUM_copy_texture_to_parent_texture
74 void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTex ture);
75
76 // GL_CHROMIUM_swapbuffers_complete_callback 72 // GL_CHROMIUM_swapbuffers_complete_callback
77 class SwapBuffersCompleteCallbackCHROMIUM { 73 class SwapBuffersCompleteCallbackCHROMIUM {
78 public: 74 public:
79 virtual void onSwapBuffersComplete() = 0; 75 virtual void onSwapBuffersComplete() = 0;
80 virtual ~SwapBuffersCompleteCallbackCHROMIUM() { } 76 virtual ~SwapBuffersCompleteCallbackCHROMIUM() { }
81 }; 77 };
82 void setSwapBuffersCompleteCallbackCHROMIUM(PassOwnPtr<SwapBuffersCompleteCa llbackCHROMIUM>); 78 void setSwapBuffersCompleteCallbackCHROMIUM(PassOwnPtr<SwapBuffersCompleteCa llbackCHROMIUM>);
83 79
84 // GL_CHROMIUM_rate_limit_offscreen_context 80 // GL_CHROMIUM_rate_limit_offscreen_context
85 void rateLimitOffscreenContextCHROMIUM(); 81 void rateLimitOffscreenContextCHROMIUM();
86 82
87 // GL_CHROMIUM_paint_framebuffer_canvas 83 // GL_CHROMIUM_paint_framebuffer_canvas
88 void paintFramebufferToCanvas(int framebuffer, int width, int height, bool p remultiplyAlpha, ImageBuffer*); 84 void paintFramebufferToCanvas(int framebuffer, int width, int height, bool p remultiplyAlpha, ImageBuffer*);
89 85
90 private: 86 private:
91 // Instances of this class are strictly owned by the GraphicsContext3D imple mentation and do not 87 // Instances of this class are strictly owned by the GraphicsContext3D imple mentation and do not
92 // need to be instantiated by any other code. 88 // need to be instantiated by any other code.
93 friend class GraphicsContext3DInternal; 89 friend class GraphicsContext3DInternal;
94 explicit Extensions3DChromium(GraphicsContext3DInternal*); 90 explicit Extensions3DChromium(GraphicsContext3DInternal*);
95 91
96 // Weak pointer back to GraphicsContext3DInternal 92 // Weak pointer back to GraphicsContext3DInternal
97 GraphicsContext3DInternal* m_internal; 93 GraphicsContext3DInternal* m_internal;
98 }; 94 };
99 95
100 } // namespace WebCore 96 } // namespace WebCore
101 97
102 #endif // Extensions3DChromium_h 98 #endif // Extensions3DChromium_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698