Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: Source/platform/graphics/test/MockWebGraphicsContext3D.h

Issue 481433002: gpu: Remove WebGraphicsContext3D::makeContextCurrent() in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to ToT Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/Extensions3DUtil.cpp ('k') | public/platform/WebGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698