-1, mirrored ? -1 : 1, -(far + near) / (far - near), 1);
}
+#if OS(TIZEN)
+static inline bool withinEpsilon(float a, float b)
+{
+ const float epsilon = 0.001f;
+ return fabs(a - b) < epsilon;
+}
+
+static inline bool isRectilinear(const FloatQuad& rect)
+{
+ return (withinEpsilon(rect.p1().x(), rect.p2().x()) && withinEpsilon(rect.p2().y(), rect.p3().y()) && withinEpsilon(rect.p3().x(), rect.p4().x()) && withinEpsilon(rect.p4().y(), rect.p1().y()))
+ || (withinEpsilon(rect.p1().y(), rect.p2().y()) && withinEpsilon(rect.p2().x(), rect.p3().x()) && withinEpsilon(rect.p3().y(), rect.p4().y()) && withinEpsilon(rect.p4().x(), rect.p1().x()));
+}
+#endif
+
void BitmapTextureGL::initializeStencil()
{
if (m_rbo)
IntRect rect = quad.enclosingBoundingBox();
// Only use scissors on rectilinear clips.
+#if OS(TIZEN)
+ if (!isRectilinear(quad) || rect.isEmpty())
+#else
if (!quad.isRectilinear() || rect.isEmpty())
+#endif
return false;
#if ENABLE(TIZEN_WEBKIT2_DIRECT_RENDERING)