| 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 23 matching lines...) Expand all Loading... |
| 34 // WebGraphicsContext3D base class for use in WebKit unit tests. | 34 // WebGraphicsContext3D base class for use in WebKit unit tests. |
| 35 // All operations are no-ops (returning 0 if necessary). | 35 // All operations are no-ops (returning 0 if necessary). |
| 36 class MockWebGraphicsContext3D : public WebGraphicsContext3D { | 36 class MockWebGraphicsContext3D : public WebGraphicsContext3D { |
| 37 public: | 37 public: |
| 38 MockWebGraphicsContext3D() | 38 MockWebGraphicsContext3D() |
| 39 : m_nextTextureId(1) | 39 : m_nextTextureId(1) |
| 40 , m_contextLost(false) | 40 , m_contextLost(false) |
| 41 { | 41 { |
| 42 } | 42 } |
| 43 | 43 |
| 44 virtual bool makeContextCurrent() { return true; } | |
| 45 | |
| 46 virtual void prepareTexture() { } | 44 virtual void prepareTexture() { } |
| 47 | 45 |
| 48 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) { } | 46 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) { } |
| 49 | 47 |
| 50 virtual void synthesizeGLError(WGC3Denum) { } | 48 virtual void synthesizeGLError(WGC3Denum) { } |
| 51 | 49 |
| 52 virtual bool isContextLost() { return m_contextLost; } | 50 virtual bool isContextLost() { return m_contextLost; } |
| 53 | 51 |
| 54 virtual void* mapBufferSubDataCHROMIUM(WGC3Denum target, WGC3Dintptr offset,
WGC3Dsizeiptr size, WGC3Denum access) { return 0; } | 52 virtual void* mapBufferSubDataCHROMIUM(WGC3Denum target, WGC3Dintptr offset,
WGC3Dsizeiptr size, WGC3Denum access) { return 0; } |
| 55 virtual void unmapBufferSubDataCHROMIUM(const void*) { } | 53 virtual void unmapBufferSubDataCHROMIUM(const void*) { } |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 void fakeContextLost() { m_contextLost = true; } | 288 void fakeContextLost() { m_contextLost = true; } |
| 291 protected: | 289 protected: |
| 292 unsigned m_nextTextureId; | 290 unsigned m_nextTextureId; |
| 293 bool m_contextLost; | 291 bool m_contextLost; |
| 294 Attributes m_attrs; | 292 Attributes m_attrs; |
| 295 }; | 293 }; |
| 296 | 294 |
| 297 } // namespace blink | 295 } // namespace blink |
| 298 | 296 |
| 299 #endif // MockWebGraphicsContext3D_h | 297 #endif // MockWebGraphicsContext3D_h |
| OLD | NEW |