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

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

Issue 1812243003: Remove methods from WebGraphicsContext3D that wrap type casts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simples-tplus
Patch Set: Created 4 years, 9 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 29 matching lines...) Expand all
40 , m_contextLost(false) 40 , m_contextLost(false)
41 { 41 {
42 } 42 }
43 43
44 virtual void synthesizeGLError(WGC3Denum) { } 44 virtual void synthesizeGLError(WGC3Denum) { }
45 45
46 virtual WebString getRequestableExtensionsCHROMIUM() { return WebString(); } 46 virtual WebString getRequestableExtensionsCHROMIUM() { return WebString(); }
47 47
48 virtual void blitFramebufferCHROMIUM(WGC3Dint srcX0, WGC3Dint srcY0, WGC3Din t srcX1, WGC3Dint srcY1, WGC3Dint dstX0, WGC3Dint dstY0, WGC3Dint dstX1, WGC3Din t dstY1, WGC3Dbitfield mask, WGC3Denum filter) { } 48 virtual void blitFramebufferCHROMIUM(WGC3Dint srcX0, WGC3Dint srcY0, WGC3Din t srcX1, WGC3Dint srcY1, WGC3Dint dstX0, WGC3Dint dstY0, WGC3Dint dstX1, WGC3Din t dstY1, WGC3Dbitfield mask, WGC3Denum filter) { }
49 49
50 virtual void drawElements(WGC3Denum mode, WGC3Dsizei count, WGC3Denum type, WGC3Dintptr offset) { }
51
52 virtual bool getActiveAttrib(WebGLId program, WGC3Duint index, ActiveInfo&) { return false; } 50 virtual bool getActiveAttrib(WebGLId program, WGC3Duint index, ActiveInfo&) { return false; }
53 virtual bool getActiveUniform(WebGLId program, WGC3Duint index, ActiveInfo&) { return false; } 51 virtual bool getActiveUniform(WebGLId program, WGC3Duint index, ActiveInfo&) { return false; }
54 virtual Attributes getContextAttributes() { return m_attrs; } 52 virtual Attributes getContextAttributes() { return m_attrs; }
55 virtual WGC3Denum getError() { return 0; } 53 virtual WGC3Denum getError() { return 0; }
56 virtual WebString getProgramInfoLog(WebGLId program) { return WebString(); } 54 virtual WebString getProgramInfoLog(WebGLId program) { return WebString(); }
57 virtual WebString getShaderInfoLog(WebGLId shader) { return WebString(); } 55 virtual WebString getShaderInfoLog(WebGLId shader) { return WebString(); }
58 virtual WebString getShaderSource(WebGLId shader) { return WebString(); } 56 virtual WebString getShaderSource(WebGLId shader) { return WebString(); }
59 virtual WebString getString(WGC3Denum name) { return WebString(); } 57 virtual WebString getString(WGC3Denum name) { return WebString(); }
60 virtual WGC3Dsizeiptr getVertexAttribOffset(WGC3Duint index, WGC3Denum pname ) { return 0; }
61 58
62 virtual void shaderSource(WebGLId shader, const WGC3Dchar* string) { } 59 virtual void shaderSource(WebGLId shader, const WGC3Dchar* string) { }
63 60
64 virtual void vertexAttribPointer(WGC3Duint index, WGC3Dint size, WGC3Denum t ype, WGC3Dboolean normalized, WGC3Dsizei stride, WGC3Dintptr offset) { }
65
66 virtual void genBuffers(WGC3Dsizei count, WebGLId* ids) 61 virtual void genBuffers(WGC3Dsizei count, WebGLId* ids)
67 { 62 {
68 for (int i = 0; i < count; ++i) 63 for (int i = 0; i < count; ++i)
69 ids[i] = 1; 64 ids[i] = 1;
70 } 65 }
71 virtual void genFramebuffers(WGC3Dsizei count, WebGLId* ids) 66 virtual void genFramebuffers(WGC3Dsizei count, WebGLId* ids)
72 { 67 {
73 for (int i = 0; i < count; ++i) 68 for (int i = 0; i < count; ++i)
74 ids[i] = 1; 69 ids[i] = 1;
75 } 70 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void fakeContextLost() { m_contextLost = true; } 105 void fakeContextLost() { m_contextLost = true; }
111 protected: 106 protected:
112 unsigned m_nextTextureId; 107 unsigned m_nextTextureId;
113 bool m_contextLost; 108 bool m_contextLost;
114 Attributes m_attrs; 109 Attributes m_attrs;
115 }; 110 };
116 111
117 } // namespace blink 112 } // namespace blink
118 113
119 #endif // MockWebGraphicsContext3D_h 114 #endif // MockWebGraphicsContext3D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698