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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 virtual ~WebGraphicsContext3D() { } | 156 virtual ~WebGraphicsContext3D() { } |
157 | 157 |
158 // Makes the OpenGL context current on the current thread. Returns true on | 158 // Makes the OpenGL context current on the current thread. Returns true on |
159 // success. | 159 // success. |
160 virtual bool makeContextCurrent() = 0; | 160 virtual bool makeContextCurrent() = 0; |
161 | 161 |
162 // Each flush or finish is assigned an unique ID. The larger | 162 // Each flush or finish is assigned an unique ID. The larger |
163 // the ID number, the more recently the context has been flushed. | 163 // the ID number, the more recently the context has been flushed. |
164 virtual uint32_t lastFlushID() { return 0; } | 164 virtual uint32_t lastFlushID() { return 0; } |
165 | 165 |
166 // The size of the region into which this WebGraphicsContext3D is rendering. | |
167 // Returns the last values passed to reshape(). | |
168 virtual int width() = 0; | |
169 virtual int height() = 0; | |
170 | |
171 // Resizes the region into which this WebGraphicsContext3D is drawing. | 166 // Resizes the region into which this WebGraphicsContext3D is drawing. |
172 virtual void reshape(int width, int height) = 0; | |
173 virtual void reshapeWithScaleFactor(int width, int height, float scaleFactor
) { } | 167 virtual void reshapeWithScaleFactor(int width, int height, float scaleFactor
) { } |
174 | 168 |
175 // GL_CHROMIUM_setVisibility - Changes the visibility of the backbuffer | 169 // GL_CHROMIUM_setVisibility - Changes the visibility of the backbuffer |
176 virtual void setVisibilityCHROMIUM(bool visible) = 0; | 170 virtual void setVisibilityCHROMIUM(bool visible) = 0; |
177 | 171 |
178 // GL_CHROMIUM_gpu_memory_manager - sets callback to observe changes to memo
ry allocation limits. | 172 // GL_CHROMIUM_gpu_memory_manager - sets callback to observe changes to memo
ry allocation limits. |
179 virtual void setMemoryAllocationChangedCallbackCHROMIUM(WebGraphicsMemoryAll
ocationChangedCallbackCHROMIUM* callback) { } | 173 virtual void setMemoryAllocationChangedCallbackCHROMIUM(WebGraphicsMemoryAll
ocationChangedCallbackCHROMIUM* callback) { } |
180 virtual void sendManagedMemoryStatsCHROMIUM(const WebGraphicsManagedMemorySt
ats* stats) { } | 174 virtual void sendManagedMemoryStatsCHROMIUM(const WebGraphicsManagedMemorySt
ats* stats) { } |
181 | 175 |
182 // GL_EXT_discard_framebuffer - makes specified attachments of currently bou
nd framebuffer undefined. | 176 // GL_EXT_discard_framebuffer - makes specified attachments of currently bou
nd framebuffer undefined. |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 485 |
492 // GL_ANGLE_instanced_arrays | 486 // GL_ANGLE_instanced_arrays |
493 virtual void drawArraysInstancedANGLE(WGC3Denum mode, WGC3Dint first, WGC3Ds
izei count, WGC3Dsizei primcount) { } | 487 virtual void drawArraysInstancedANGLE(WGC3Denum mode, WGC3Dint first, WGC3Ds
izei count, WGC3Dsizei primcount) { } |
494 virtual void drawElementsInstancedANGLE(WGC3Denum mode, WGC3Dsizei count, WG
C3Denum type, WGC3Dintptr offset, WGC3Dsizei primcount) { } | 488 virtual void drawElementsInstancedANGLE(WGC3Denum mode, WGC3Dsizei count, WG
C3Denum type, WGC3Dintptr offset, WGC3Dsizei primcount) { } |
495 virtual void vertexAttribDivisorANGLE(WGC3Duint index, WGC3Duint divisor) {
} | 489 virtual void vertexAttribDivisorANGLE(WGC3Duint index, WGC3Duint divisor) {
} |
496 }; | 490 }; |
497 | 491 |
498 } // namespace WebKit | 492 } // namespace WebKit |
499 | 493 |
500 #endif | 494 #endif |
OLD | NEW |