OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // GL_CHROMIUM_discard_backbuffer - controls allocation/deallocation of the
back buffer. | 181 // GL_CHROMIUM_discard_backbuffer - controls allocation/deallocation of the
back buffer. |
182 virtual void discardBackbufferCHROMIUM() { } | 182 virtual void discardBackbufferCHROMIUM() { } |
183 virtual void ensureBackbufferCHROMIUM() { } | 183 virtual void ensureBackbufferCHROMIUM() { } |
184 | 184 |
185 virtual unsigned insertSyncPoint() { return 0; } | 185 virtual unsigned insertSyncPoint() { return 0; } |
186 virtual void waitSyncPoint(unsigned) { } | 186 virtual void waitSyncPoint(unsigned) { } |
187 // This call passes ownership of the WebGraphicsSyncPointCallback to the | 187 // This call passes ownership of the WebGraphicsSyncPointCallback to the |
188 // WebGraphicsContext3D implementation. | 188 // WebGraphicsContext3D implementation. |
189 virtual void signalSyncPoint(unsigned syncPoint, WebGraphicsSyncPointCallbac
k* callback) { delete callback; } | 189 virtual void signalSyncPoint(unsigned syncPoint, WebGraphicsSyncPointCallbac
k* callback) { delete callback; } |
190 | 190 |
191 // Helper for software compositing path. Reads back the frame buffer into | |
192 // the memory region pointed to by "pixels" with size "bufferSize". It is | |
193 // expected that the storage for "pixels" covers (4 * width * height) bytes. | |
194 // The RGBA channels are packed into "pixels" using SkBitmap's byte | |
195 // ordering. Returns true on success. | |
196 virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize, W
ebGLId framebuffer, int width, int height) = 0; | |
197 | |
198 // Copies the contents of the off-screen render target used by the WebGL | 191 // Copies the contents of the off-screen render target used by the WebGL |
199 // context to the corresponding texture used by the compositor. | 192 // context to the corresponding texture used by the compositor. |
200 virtual void prepareTexture() = 0; | 193 virtual void prepareTexture() = 0; |
201 | 194 |
202 // GL_CHROMIUM_post_sub_buffer - Copies part of the back buffer to the front
buffer. | 195 // GL_CHROMIUM_post_sub_buffer - Copies part of the back buffer to the front
buffer. |
203 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) = 0; | 196 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) = 0; |
204 | 197 |
205 // Synthesizes an OpenGL error which will be returned from a | 198 // Synthesizes an OpenGL error which will be returned from a |
206 // later call to getError. This is used to emulate OpenGL ES | 199 // later call to getError. This is used to emulate OpenGL ES |
207 // 2.0 behavior on the desktop and to enforce additional error | 200 // 2.0 behavior on the desktop and to enforce additional error |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 virtual void unmapImageCHROMIUM(WGC3Duint imageId) { } | 482 virtual void unmapImageCHROMIUM(WGC3Duint imageId) { } |
490 | 483 |
491 protected: | 484 protected: |
492 virtual GrGLInterface* onCreateGrGLInterface() { return 0; } | 485 virtual GrGLInterface* onCreateGrGLInterface() { return 0; } |
493 | 486 |
494 }; | 487 }; |
495 | 488 |
496 } // namespace WebKit | 489 } // namespace WebKit |
497 | 490 |
498 #endif | 491 #endif |
OLD | NEW |