Title: [144169] trunk/Source/WebCore
- Revision
- 144169
- Author
- [email protected]
- Date
- 2013-02-27 04:05:58 -0800 (Wed, 27 Feb 2013)
Log Message
[texmap] Do not apply clip state if redundant
https://bugs.webkit.org/show_bug.cgi?id=110790
Reviewed by Noam Rosenthal.
Add a bool to check if clip state has changed since last apply.
No behavior changes, thus covered by existing tests.
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::ClipStack::reset):
(WebCore::TextureMapperGL::ClipStack::pop):
(WebCore::TextureMapperGL::ClipStack::apply):
* platform/graphics/texmap/TextureMapperGL.h:
(WebCore::TextureMapperGL::ClipStack::ClipStack):
(ClipStack):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (144168 => 144169)
--- trunk/Source/WebCore/ChangeLog 2013-02-27 12:05:56 UTC (rev 144168)
+++ trunk/Source/WebCore/ChangeLog 2013-02-27 12:05:58 UTC (rev 144169)
@@ -1,3 +1,22 @@
+2013-02-27 Bruno de Oliveira Abinader <[email protected]>
+
+ [texmap] Do not apply clip state if redundant
+ https://bugs.webkit.org/show_bug.cgi?id=110790
+
+ Reviewed by Noam Rosenthal.
+
+ Add a bool to check if clip state has changed since last apply.
+
+ No behavior changes, thus covered by existing tests.
+
+ * platform/graphics/texmap/TextureMapperGL.cpp:
+ (WebCore::TextureMapperGL::ClipStack::reset):
+ (WebCore::TextureMapperGL::ClipStack::pop):
+ (WebCore::TextureMapperGL::ClipStack::apply):
+ * platform/graphics/texmap/TextureMapperGL.h:
+ (WebCore::TextureMapperGL::ClipStack::ClipStack):
+ (ClipStack):
+
2013-02-27 Eugene Klyuchnikov <[email protected]>
Web Inspector: timeline stops working on certain sites
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (144168 => 144169)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2013-02-27 12:05:56 UTC (rev 144168)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2013-02-27 12:05:58 UTC (rev 144169)
@@ -179,6 +179,7 @@
{
clipStack.clear();
clipState = TextureMapperGL::ClipState(rect);
+ clipStateDirty = true;
}
void TextureMapperGL::ClipStack::push()
@@ -192,6 +193,7 @@
return;
clipState = clipStack.last();
clipStack.removeLast();
+ clipStateDirty = true;
}
static void scissorClip(GraphicsContext3D* context, const IntRect& rect)
@@ -206,6 +208,10 @@
void TextureMapperGL::ClipStack::apply(GraphicsContext3D* context)
{
+ if (!clipStateDirty)
+ return;
+ clipStateDirty = false;
+
scissorClip(context, clipState.scissorBox);
context->stencilOp(GraphicsContext3D::KEEP, GraphicsContext3D::KEEP, GraphicsContext3D::KEEP);
context->stencilFunc(GraphicsContext3D::EQUAL, clipState.stencilIndex - 1, clipState.stencilIndex - 1);
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h (144168 => 144169)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h 2013-02-27 12:05:56 UTC (rev 144168)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h 2013-02-27 12:05:58 UTC (rev 144169)
@@ -89,6 +89,10 @@
class ClipStack {
public:
+ ClipStack()
+ : clipStateDirty(false)
+ { }
+
void push();
void pop();
void apply(GraphicsContext3D*);
@@ -98,6 +102,7 @@
private:
ClipState clipState;
Vector<ClipState> clipStack;
+ bool clipStateDirty;
};
TextureMapperGL();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes