| OLD | NEW | 
|    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 13 matching lines...) Expand all  Loading... | 
|   24  */ |   24  */ | 
|   25  |   25  | 
|   26 #ifndef WebGLProgram_h |   26 #ifndef WebGLProgram_h | 
|   27 #define WebGLProgram_h |   27 #define WebGLProgram_h | 
|   28  |   28  | 
|   29 #include "modules/webgl/WebGLShader.h" |   29 #include "modules/webgl/WebGLShader.h" | 
|   30 #include "modules/webgl/WebGLSharedPlatform3DObject.h" |   30 #include "modules/webgl/WebGLSharedPlatform3DObject.h" | 
|   31 #include "wtf/PassRefPtr.h" |   31 #include "wtf/PassRefPtr.h" | 
|   32 #include "wtf/Vector.h" |   32 #include "wtf/Vector.h" | 
|   33  |   33  | 
|   34 namespace gpu { |  | 
|   35 namespace gles2 { |  | 
|   36 class GLES2Interface; |  | 
|   37 } |  | 
|   38 } |  | 
|   39  |  | 
|   40 namespace blink { |   34 namespace blink { | 
|   41  |   35  | 
|   42 class WebGLProgram final : public WebGLSharedPlatform3DObject { |   36 class WebGLProgram final : public WebGLSharedPlatform3DObject { | 
|   43     DEFINE_WRAPPERTYPEINFO(); |   37     DEFINE_WRAPPERTYPEINFO(); | 
|   44 public: |   38 public: | 
|   45     ~WebGLProgram() override; |   39     ~WebGLProgram() override; | 
|   46  |   40  | 
|   47     static WebGLProgram* create(WebGLRenderingContextBase*); |   41     static WebGLProgram* create(WebGLRenderingContextBase*); | 
|   48  |   42  | 
|   49     unsigned numActiveAttribLocations(); |   43     unsigned numActiveAttribLocations(); | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
|   67  |   61  | 
|   68     WebGLShader* getAttachedShader(GLenum); |   62     WebGLShader* getAttachedShader(GLenum); | 
|   69     bool attachShader(WebGLShader*); |   63     bool attachShader(WebGLShader*); | 
|   70     bool detachShader(WebGLShader*); |   64     bool detachShader(WebGLShader*); | 
|   71  |   65  | 
|   72     DECLARE_VIRTUAL_TRACE(); |   66     DECLARE_VIRTUAL_TRACE(); | 
|   73  |   67  | 
|   74 protected: |   68 protected: | 
|   75     explicit WebGLProgram(WebGLRenderingContextBase*); |   69     explicit WebGLProgram(WebGLRenderingContextBase*); | 
|   76  |   70  | 
|   77     void deleteObjectImpl(WebGraphicsContext3D*) override; |   71     void deleteObjectImpl(WebGraphicsContext3D*, gpu::gles2::GLES2Interface*) ov
     erride; | 
|   78  |   72  | 
|   79 private: |   73 private: | 
|   80     bool isProgram() const override { return true; } |   74     bool isProgram() const override { return true; } | 
|   81  |   75  | 
|   82     void cacheActiveAttribLocations(WebGraphicsContext3D*, gpu::gles2::GLES2Inte
     rface*); |   76     void cacheActiveAttribLocations(WebGraphicsContext3D*, gpu::gles2::GLES2Inte
     rface*); | 
|   83     void cacheInfoIfNeeded(); |   77     void cacheInfoIfNeeded(); | 
|   84  |   78  | 
|   85     Vector<GLint> m_activeAttribLocations; |   79     Vector<GLint> m_activeAttribLocations; | 
|   86  |   80  | 
|   87     GLint m_linkStatus; |   81     GLint m_linkStatus; | 
|   88  |   82  | 
|   89     // This is used to track whether a WebGLUniformLocation belongs to this |   83     // This is used to track whether a WebGLUniformLocation belongs to this | 
|   90     // program or not. |   84     // program or not. | 
|   91     unsigned m_linkCount; |   85     unsigned m_linkCount; | 
|   92  |   86  | 
|   93     // This is used to track the program being used by active transform |   87     // This is used to track the program being used by active transform | 
|   94     // feedback objects. |   88     // feedback objects. | 
|   95     unsigned m_activeTransformFeedbackCount; |   89     unsigned m_activeTransformFeedbackCount; | 
|   96  |   90  | 
|   97     Member<WebGLShader> m_vertexShader; |   91     Member<WebGLShader> m_vertexShader; | 
|   98     Member<WebGLShader> m_fragmentShader; |   92     Member<WebGLShader> m_fragmentShader; | 
|   99  |   93  | 
|  100     bool m_infoValid; |   94     bool m_infoValid; | 
|  101 }; |   95 }; | 
|  102  |   96  | 
|  103 } // namespace blink |   97 } // namespace blink | 
|  104  |   98  | 
|  105 #endif // WebGLProgram_h |   99 #endif // WebGLProgram_h | 
| OLD | NEW |