| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 175     virtual void setMemoryAllocationChangedCallbackCHROMIUM(WebGraphicsMemoryAll
     ocationChangedCallbackCHROMIUM* callback) { } | 175     virtual void setMemoryAllocationChangedCallbackCHROMIUM(WebGraphicsMemoryAll
     ocationChangedCallbackCHROMIUM* callback) { } | 
| 176     virtual void sendManagedMemoryStatsCHROMIUM(const WebGraphicsManagedMemorySt
     ats* stats) { } | 176     virtual void sendManagedMemoryStatsCHROMIUM(const WebGraphicsManagedMemorySt
     ats* stats) { } | 
| 177 | 177 | 
| 178     // GL_EXT_discard_framebuffer - makes specified attachments of currently bou
     nd framebuffer undefined. | 178     // GL_EXT_discard_framebuffer - makes specified attachments of currently bou
     nd framebuffer undefined. | 
| 179     virtual void discardFramebufferEXT(WGC3Denum target, WGC3Dsizei numAttachmen
     ts, const WGC3Denum* attachments) { } | 179     virtual void discardFramebufferEXT(WGC3Denum target, WGC3Dsizei numAttachmen
     ts, const WGC3Denum* attachments) { } | 
| 180 | 180 | 
| 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     // FIXME: this api is not used anymore. |  | 
| 186     // Query whether it is built on top of compliant GLES2 implementation. |  | 
| 187     virtual bool isGLES2Compliant() { return true; } |  | 
| 188 |  | 
| 189     virtual unsigned insertSyncPoint() { return 0; } | 185     virtual unsigned insertSyncPoint() { return 0; } | 
| 190     virtual void waitSyncPoint(unsigned) { } | 186     virtual void waitSyncPoint(unsigned) { } | 
| 191     // This call passes ownership of the WebGraphicsSyncPointCallback to the | 187     // This call passes ownership of the WebGraphicsSyncPointCallback to the | 
| 192     // WebGraphicsContext3D implementation. | 188     // WebGraphicsContext3D implementation. | 
| 193     virtual void signalSyncPoint(unsigned syncPoint, WebGraphicsSyncPointCallbac
     k* callback) { delete callback; } | 189     virtual void signalSyncPoint(unsigned syncPoint, WebGraphicsSyncPointCallbac
     k* callback) { delete callback; } | 
| 194 | 190 | 
| 195     // Helper for software compositing path. Reads back the frame buffer into | 191     // Helper for software compositing path. Reads back the frame buffer into | 
| 196     // the memory region pointed to by "pixels" with size "bufferSize". It is | 192     // the memory region pointed to by "pixels" with size "bufferSize". It is | 
| 197     // expected that the storage for "pixels" covers (4 * width * height) bytes. | 193     // expected that the storage for "pixels" covers (4 * width * height) bytes. | 
| 198     // The RGBA channels are packed into "pixels" using SkBitmap's byte | 194     // The RGBA channels are packed into "pixels" using SkBitmap's byte | 
| 199     // ordering. Returns true on success. | 195     // ordering. Returns true on success. | 
| 200     virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize, W
     ebGLId framebuffer, int width, int height) = 0; | 196     virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize, W
     ebGLId framebuffer, int width, int height) = 0; | 
| 201 | 197 | 
| 202     // FIXME: this api is not used anymore. |  | 
| 203     // Returns the id of the texture which is used for storing the contents of |  | 
| 204     // the framebuffer associated with this context. This texture is accessible |  | 
| 205     // by the gpu-based page compositor. |  | 
| 206     virtual WebGLId getPlatformTextureId() { return 0; } |  | 
| 207 |  | 
| 208     // Copies the contents of the off-screen render target used by the WebGL | 198     // Copies the contents of the off-screen render target used by the WebGL | 
| 209     // context to the corresponding texture used by the compositor. | 199     // context to the corresponding texture used by the compositor. | 
| 210     virtual void prepareTexture() = 0; | 200     virtual void prepareTexture() = 0; | 
| 211 | 201 | 
| 212     // GL_CHROMIUM_post_sub_buffer - Copies part of the back buffer to the front
      buffer. | 202     // GL_CHROMIUM_post_sub_buffer - Copies part of the back buffer to the front
      buffer. | 
| 213     virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) = 0; | 203     virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) = 0; | 
| 214 | 204 | 
| 215     // Synthesizes an OpenGL error which will be returned from a | 205     // Synthesizes an OpenGL error which will be returned from a | 
| 216     // later call to getError. This is used to emulate OpenGL ES | 206     // later call to getError. This is used to emulate OpenGL ES | 
| 217     // 2.0 behavior on the desktop and to enforce additional error | 207     // 2.0 behavior on the desktop and to enforce additional error | 
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 499     virtual void unmapImageCHROMIUM(WGC3Duint imageId) { } | 489     virtual void unmapImageCHROMIUM(WGC3Duint imageId) { } | 
| 500 | 490 | 
| 501 protected: | 491 protected: | 
| 502     virtual GrGLInterface* onCreateGrGLInterface() { return 0; } | 492     virtual GrGLInterface* onCreateGrGLInterface() { return 0; } | 
| 503 | 493 | 
| 504 }; | 494 }; | 
| 505 | 495 | 
| 506 } // namespace WebKit | 496 } // namespace WebKit | 
| 507 | 497 | 
| 508 #endif | 498 #endif | 
| OLD | NEW | 
|---|