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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLProgram.h

Issue 1824433002: Remove getError() and synthesizeGLError() from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simples-tplus
Patch Set: errors: rebase 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 22 matching lines...) Expand all
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class WebGLProgram final : public WebGLSharedPlatform3DObject { 36 class WebGLProgram final : public WebGLSharedPlatform3DObject {
37 DEFINE_WRAPPERTYPEINFO(); 37 DEFINE_WRAPPERTYPEINFO();
38 public: 38 public:
39 ~WebGLProgram() override; 39 ~WebGLProgram() override;
40 40
41 static WebGLProgram* create(WebGLRenderingContextBase*); 41 static WebGLProgram* create(WebGLRenderingContextBase*);
42 42
43 unsigned numActiveAttribLocations(); 43 bool linkStatus(WebGLRenderingContextBase*);
44 GLint getActiveAttribLocation(GLuint index);
45
46 bool isUsingVertexAttrib0();
47
48 bool linkStatus();
49 44
50 unsigned linkCount() const { return m_linkCount; } 45 unsigned linkCount() const { return m_linkCount; }
51 46
52 // This is to be called everytime after the program is successfully linked. 47 // This is to be called everytime after the program is successfully linked.
53 // We don't deal with integer overflow here, assuming in reality a program 48 // We don't deal with integer overflow here, assuming in reality a program
54 // will never be linked so many times. 49 // will never be linked so many times.
55 // Also, we invalidate the cached program info. 50 // Also, we invalidate the cached program info.
56 void increaseLinkCount(); 51 void increaseLinkCount();
57 52
58 unsigned activeTransformFeedbackCount() const { return m_activeTransformFeed backCount; } 53 unsigned activeTransformFeedbackCount() const { return m_activeTransformFeed backCount; }
59 void increaseActiveTransformFeedbackCount(); 54 void increaseActiveTransformFeedbackCount();
60 void decreaseActiveTransformFeedbackCount(); 55 void decreaseActiveTransformFeedbackCount();
61 56
62 WebGLShader* getAttachedShader(GLenum); 57 WebGLShader* getAttachedShader(GLenum);
63 bool attachShader(WebGLShader*); 58 bool attachShader(WebGLShader*);
64 bool detachShader(WebGLShader*); 59 bool detachShader(WebGLShader*);
65 60
66 DECLARE_VIRTUAL_TRACE(); 61 DECLARE_VIRTUAL_TRACE();
67 62
68 protected: 63 protected:
69 explicit WebGLProgram(WebGLRenderingContextBase*); 64 explicit WebGLProgram(WebGLRenderingContextBase*);
70 65
71 void deleteObjectImpl(WebGraphicsContext3D*, gpu::gles2::GLES2Interface*) ov erride; 66 void deleteObjectImpl(WebGraphicsContext3D*, gpu::gles2::GLES2Interface*) ov erride;
72 67
73 private: 68 private:
74 bool isProgram() const override { return true; } 69 bool isProgram() const override { return true; }
75 70
76 void cacheActiveAttribLocations(WebGraphicsContext3D*, gpu::gles2::GLES2Inte rface*); 71 void cacheInfoIfNeeded(WebGLRenderingContextBase*);
77 void cacheInfoIfNeeded();
78
79 Vector<GLint> m_activeAttribLocations;
80 72
81 GLint m_linkStatus; 73 GLint m_linkStatus;
82 74
83 // This is used to track whether a WebGLUniformLocation belongs to this 75 // This is used to track whether a WebGLUniformLocation belongs to this
84 // program or not. 76 // program or not.
85 unsigned m_linkCount; 77 unsigned m_linkCount;
86 78
87 // This is used to track the program being used by active transform 79 // This is used to track the program being used by active transform
88 // feedback objects. 80 // feedback objects.
89 unsigned m_activeTransformFeedbackCount; 81 unsigned m_activeTransformFeedbackCount;
90 82
91 Member<WebGLShader> m_vertexShader; 83 Member<WebGLShader> m_vertexShader;
92 Member<WebGLShader> m_fragmentShader; 84 Member<WebGLShader> m_fragmentShader;
93 85
94 bool m_infoValid; 86 bool m_infoValid;
95 }; 87 };
96 88
97 } // namespace blink 89 } // namespace blink
98 90
99 #endif // WebGLProgram_h 91 #endif // WebGLProgram_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLObject.h ('k') | third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698