diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering')
5 files changed, 16 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp index 32f353c..19dc1f8 100644 --- a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp @@ -107,6 +107,14 @@ void GLUtils::setOrthographicMatrix(TransformationMatrix& ortho, float left, flo ortho.setM43(-(nearZ + farZ) / deltaZ); } +bool GLUtils::has3dTransform(const TransformationMatrix& matrix) +{ + return matrix.m13() != 0 || matrix.m23() != 0 + || matrix.m31() != 0 || matrix.m32() != 0 + || matrix.m33() != 1 || matrix.m34() != 0 + || matrix.m43() != 0; +} + ///////////////////////////////////////////////////////////////////////////////////////// // GL & EGL error checks ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/Source/WebCore/platform/graphics/android/rendering/GLUtils.h b/Source/WebCore/platform/graphics/android/rendering/GLUtils.h index 1b69d6c..c2dec7d 100644 --- a/Source/WebCore/platform/graphics/android/rendering/GLUtils.h +++ b/Source/WebCore/platform/graphics/android/rendering/GLUtils.h @@ -56,6 +56,7 @@ public: static void toSkMatrix(SkMatrix& skmatrix, const TransformationMatrix& matrix); static void setOrthographicMatrix(TransformationMatrix& ortho, float left, float top, float right, float bottom, float nearZ, float farZ); + static bool has3dTransform(const TransformationMatrix& matrix); // GL & EGL error checks static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE); diff --git a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp index 5098b4b..2ec78d2 100644 --- a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp @@ -239,7 +239,8 @@ void ImageTexture::drawGL(LayerAndroid* layer, float opacity) // transform and opacity, so we need to set m_layer m_layer = layer; if (m_tileGrid) { - IntRect visibleContentArea = m_layer->visibleContentArea(); + bool force3dContentVisible = true; + IntRect visibleContentArea = m_layer->visibleContentArea(force3dContentVisible); m_tileGrid->drawGL(visibleContentArea, opacity, transform()); } m_layer = 0; diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp index 2617bae..173b8af 100644 --- a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp @@ -152,10 +152,10 @@ void Surface::addLayer(LayerAndroid* layer, const TransformationMatrix& transfor m_background = static_cast<BaseLayerAndroid*>(layer)->getBackgroundColor(); } -IntRect Surface::visibleContentArea() +IntRect Surface::visibleContentArea(bool force3dContentVisible) { if (singleLayer()) - return getFirstLayer()->visibleContentArea(); + return getFirstLayer()->visibleContentArea(force3dContentVisible); IntRect rect = m_fullContentArea; @@ -246,7 +246,8 @@ bool Surface::drawGL(bool layerTilesDisabled) ALOGV("drawGL on Surf %p with SurfBack %p, first layer %s (%d)", this, m_surfaceBacking, getFirstLayer()->subclassName().ascii().data(), getFirstLayer()->uniqueId()); - IntRect drawArea = visibleContentArea(); + bool force3dContentVisible = true; + IntRect drawArea = visibleContentArea(force3dContentVisible); m_surfaceBacking->drawGL(drawArea, opacity(), drawTransform(), useAggressiveRendering(), background()); } diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.h b/Source/WebCore/platform/graphics/android/rendering/Surface.h index 50839ee..bd1d21c 100644 --- a/Source/WebCore/platform/graphics/android/rendering/Surface.h +++ b/Source/WebCore/platform/graphics/android/rendering/Surface.h @@ -71,7 +71,7 @@ public: private: IntRect computePrepareArea(); - IntRect visibleContentArea(); + IntRect visibleContentArea(bool force3dContentVisible = false); IntRect fullContentArea(); bool singleLayer() { return m_layers.size() == 1; } bool useAggressiveRendering(); |