Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
| index a7b105741259c5e6c2394d39e2cb4c2884ff18e0..6666867c4ed6ec327e7504bb899494e711e98629 100644 |
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
| @@ -111,13 +111,13 @@ class WebGLRenderingContextErrorMessageCallback; |
| // the DrawingBuffer requires RGB emulation. |
| class ScopedRGBEmulationColorMask { |
| public: |
| - ScopedRGBEmulationColorMask(gpu::gles2::GLES2Interface*, |
| + ScopedRGBEmulationColorMask(WebGLRenderingContextBase*, |
| GLboolean* colorMask, |
| DrawingBuffer*); |
| ~ScopedRGBEmulationColorMask(); |
| private: |
| - gpu::gles2::GLES2Interface* m_contextGL; |
| + WeakPersistent<WebGLRenderingContextBase> m_context; |
|
Ken Russell (switch to Gerrit)
2016/12/01 07:20:43
I'm concerned about the performance impact of allo
Ken Russell (switch to Gerrit)
2016/12/01 08:36:47
I just learned from looking at another CL ( https:
Kai Ninomiya
2016/12/01 23:30:20
Done.
|
| GLboolean m_colorMask[4]; |
| const bool m_requiresEmulation; |
| }; |
| @@ -592,6 +592,16 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, |
| void commit(ScriptState*, ExceptionState&); |
| + std::list<ScopedRGBEmulationColorMask*> activeScopedRGBEmulationColorMasks; |
|
Ken Russell (switch to Gerrit)
2016/12/01 07:20:43
Please put all of this in the private section and
Kai Ninomiya
2016/12/01 23:30:20
Done.
|
| + void pushActiveScopedRGBEmulationColorMask(ScopedRGBEmulationColorMask* val) { |
| + activeScopedRGBEmulationColorMasks.push_back(val); |
| + } |
| + ScopedRGBEmulationColorMask* popActiveScopedRGBEmulationColorMask() { |
| + auto removed = activeScopedRGBEmulationColorMasks.back(); |
| + activeScopedRGBEmulationColorMasks.pop_back(); |
| + return removed; |
| + } |
| + |
| protected: |
| friend class EXTDisjointTimerQuery; |
| friend class EXTDisjointTimerQueryWebGL2; |