| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 29 matching lines...) Expand all Loading... |
| 40 , m_contextLost(false) | 40 , m_contextLost(false) |
| 41 { | 41 { |
| 42 } | 42 } |
| 43 | 43 |
| 44 virtual void prepareTexture() { } | 44 virtual void prepareTexture() { } |
| 45 | 45 |
| 46 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) { } | 46 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) { } |
| 47 | 47 |
| 48 virtual void synthesizeGLError(WGC3Denum) { } | 48 virtual void synthesizeGLError(WGC3Denum) { } |
| 49 | 49 |
| 50 virtual bool isContextLost() { return m_contextLost; } | |
| 51 | |
| 52 virtual void* mapBufferSubDataCHROMIUM(WGC3Denum target, WGC3Dintptr offset,
WGC3Dsizeiptr size, WGC3Denum access) { return 0; } | 50 virtual void* mapBufferSubDataCHROMIUM(WGC3Denum target, WGC3Dintptr offset,
WGC3Dsizeiptr size, WGC3Denum access) { return 0; } |
| 53 virtual void unmapBufferSubDataCHROMIUM(const void*) { } | 51 virtual void unmapBufferSubDataCHROMIUM(const void*) { } |
| 54 virtual void* mapTexSubImage2DCHROMIUM(WGC3Denum target, WGC3Dint level, WGC
3Dint xoffset, WGC3Dint yoffset, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum
format, WGC3Denum type, WGC3Denum access) { return 0; } | 52 virtual void* mapTexSubImage2DCHROMIUM(WGC3Denum target, WGC3Dint level, WGC
3Dint xoffset, WGC3Dint yoffset, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum
format, WGC3Denum type, WGC3Denum access) { return 0; } |
| 55 virtual void unmapTexSubImage2DCHROMIUM(const void*) { } | 53 virtual void unmapTexSubImage2DCHROMIUM(const void*) { } |
| 56 | 54 |
| 57 virtual void setVisibilityCHROMIUM(bool visible) { } | 55 virtual void setVisibilityCHROMIUM(bool visible) { } |
| 58 | 56 |
| 59 virtual void discardFramebufferEXT(WGC3Denum target, WGC3Dsizei numAttachmen
ts, const WGC3Denum* attachments) { } | 57 virtual void discardFramebufferEXT(WGC3Denum target, WGC3Dsizei numAttachmen
ts, const WGC3Denum* attachments) { } |
| 60 virtual void ensureFramebufferCHROMIUM() { } | 58 virtual void ensureFramebufferCHROMIUM() { } |
| 61 | 59 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 virtual WebGLId createQueryEXT() { return 1; } | 276 virtual WebGLId createQueryEXT() { return 1; } |
| 279 virtual void deleteQueryEXT(WebGLId) { } | 277 virtual void deleteQueryEXT(WebGLId) { } |
| 280 virtual GLboolean isQueryEXT(WebGLId) { return true; } | 278 virtual GLboolean isQueryEXT(WebGLId) { return true; } |
| 281 virtual void beginQueryEXT(GLenum, WebGLId) { } | 279 virtual void beginQueryEXT(GLenum, WebGLId) { } |
| 282 virtual void endQueryEXT(GLenum) { } | 280 virtual void endQueryEXT(GLenum) { } |
| 283 virtual void getQueryivEXT(GLenum, GLenum, GLint*) { } | 281 virtual void getQueryivEXT(GLenum, GLenum, GLint*) { } |
| 284 virtual void getQueryObjectuivEXT(WebGLId, GLenum, GLuint*) { } | 282 virtual void getQueryObjectuivEXT(WebGLId, GLenum, GLuint*) { } |
| 285 | 283 |
| 286 virtual WebString getTranslatedShaderSourceANGLE(WebGLId) { return WebString
(); } | 284 virtual WebString getTranslatedShaderSourceANGLE(WebGLId) { return WebString
(); } |
| 287 | 285 |
| 286 // Don't use this, make a MockGLES2Interface instead. |
| 287 virtual gpu::gles2::GLES2Interface* getGLES2Interface() { return nullptr; } |
| 288 |
| 288 void fakeContextLost() { m_contextLost = true; } | 289 void fakeContextLost() { m_contextLost = true; } |
| 289 protected: | 290 protected: |
| 290 unsigned m_nextTextureId; | 291 unsigned m_nextTextureId; |
| 291 bool m_contextLost; | 292 bool m_contextLost; |
| 292 Attributes m_attrs; | 293 Attributes m_attrs; |
| 293 }; | 294 }; |
| 294 | 295 |
| 295 } // namespace blink | 296 } // namespace blink |
| 296 | 297 |
| 297 #endif // MockWebGraphicsContext3D_h | 298 #endif // MockWebGraphicsContext3D_h |
| OLD | NEW |