[TexMap] Don't use GraphicsContext3D in ClipStack
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 13:04:40 +0000 (13:04 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Aug 2017 13:04:40 +0000 (13:04 +0000)
commitc0cb979b1ebe94d1660101e4fdf97af0b45870bb
tree88c4167d3997541b83ec97e21373cc6ba6491e35
parent05c0a1a2908332ed2bfafa07930a01c884dc9c19
[TexMap] Don't use GraphicsContext3D in ClipStack
https://bugs.webkit.org/show_bug.cgi?id=174776

Reviewed by Carlos Garcia Campos.

Any GraphicsContext3D object that's passed to ClipStack methods is of the
render-to-current-context nature, meaning there's no internally owned GL
context that has to be properly handled and all calls are simply passed to
OpenGL APIs. We should drop such (non-)usage of GraphicsContext3D in favor
of direct OpenGL API invocations.

This patch covers TextureMapper's ClipStack. Call sites to the apply() and
applyIfNeeded() are modified to not pass a reference to any
GraphicsContext3D object. Internally, OpenGL API entrypoints and constants
are used instead of GraphicsContext3D invocations.

No new tests -- no change in behavior.

* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::clearIfNeeded):
(WebCore::BitmapTextureGL::bindAsSurface):
* platform/graphics/texmap/ClipStack.cpp:
(WebCore::ClipStack::apply):
(WebCore::ClipStack::applyIfNeeded):
* platform/graphics/texmap/ClipStack.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::bindDefaultSurface):
(WebCore::TextureMapperGL::beginScissorClip):
(WebCore::TextureMapperGL::beginClip):
(WebCore::TextureMapperGL::endClip):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp
Source/WebCore/platform/graphics/texmap/ClipStack.cpp
Source/WebCore/platform/graphics/texmap/ClipStack.h
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp