diff options
Diffstat (limited to 'Source/WebCore')
3 files changed, 10 insertions, 7 deletions
diff --git a/Source/WebCore/platform/graphics/android/ShaderProgram.cpp b/Source/WebCore/platform/graphics/android/ShaderProgram.cpp index bf5f760..3f265fc 100644 --- a/Source/WebCore/platform/graphics/android/ShaderProgram.cpp +++ b/Source/WebCore/platform/graphics/android/ShaderProgram.cpp @@ -294,6 +294,7 @@ void ShaderProgram::drawQuadInternal(SkRect& geometry, GLenum textureTarget, GLint position, GLint alpha, + GLint texFilter, GLint contrast) { glUseProgram(program); @@ -330,26 +331,26 @@ void ShaderProgram::drawQuadInternal(SkRect& geometry, } void ShaderProgram::drawQuad(SkRect& geometry, int textureId, float opacity, - GLenum textureTarget) + GLenum textureTarget, GLint texFilter) { if (textureTarget == GL_TEXTURE_2D) { drawQuadInternal(geometry, textureId, opacity, m_program, m_hProjectionMatrix, m_hTexSampler, GL_TEXTURE_2D, - m_hPosition, alpha()); + m_hPosition, alpha(), texFilter); } else if (textureTarget == GL_TEXTURE_EXTERNAL_OES && !TilesManager::instance()->invertedScreen()) { drawQuadInternal(geometry, textureId, opacity, m_surfTexOESProgram, m_hSTOESProjectionMatrix, m_hSTOESTexSampler, GL_TEXTURE_EXTERNAL_OES, - m_hSTOESPosition, m_hSTOESAlpha); + m_hSTOESPosition, m_hSTOESAlpha, texFilter); } else if (textureTarget == GL_TEXTURE_EXTERNAL_OES && TilesManager::instance()->invertedScreen()) { drawQuadInternal(geometry, textureId, opacity, m_surfTexOESProgramInverted, m_hSTOESProjectionMatrixInverted, m_hSTOESTexSamplerInverted, GL_TEXTURE_EXTERNAL_OES, m_hSTOESPositionInverted, m_hSTOESAlphaInverted, - m_hSTOESContrastInverted); + texFilter, m_hSTOESContrastInverted); } GLUtils::checkGlError("drawQuad"); } diff --git a/Source/WebCore/platform/graphics/android/ShaderProgram.h b/Source/WebCore/platform/graphics/android/ShaderProgram.h index d8447bf..5f5ce9f 100644 --- a/Source/WebCore/platform/graphics/android/ShaderProgram.h +++ b/Source/WebCore/platform/graphics/android/ShaderProgram.h @@ -54,7 +54,8 @@ public: // support Surface texture in GL_TEXTURE_EXTERNAL_OES target on all // platforms. void drawQuad(SkRect& geometry, int textureId, float opacity, - GLenum textureTarget = GL_TEXTURE_2D); + GLenum textureTarget = GL_TEXTURE_2D, + GLint texFilter = GL_LINEAR); void drawLayerQuad(const TransformationMatrix& drawMatrix, SkRect& geometry, int textureId, float opacity, bool forceBlending = false, @@ -99,7 +100,8 @@ private: void drawQuadInternal(SkRect& geometry, GLint textureId, float opacity, GLint program, GLint projectionMatrixHandle, GLint texSampler, GLenum textureTarget, - GLint position, GLint alpha, GLint contrast = -1); + GLint position, GLint alpha, + GLint texFilter, GLint contrast = -1); void drawLayerQuadInternal(const GLfloat* projectionMatrix, int textureId, float opacity, GLenum textureTarget, GLint program, diff --git a/Source/WebCore/platform/graphics/android/TransferQueue.cpp b/Source/WebCore/platform/graphics/android/TransferQueue.cpp index 26b20dc..a8451a6 100644 --- a/Source/WebCore/platform/graphics/android/TransferQueue.cpp +++ b/Source/WebCore/platform/graphics/android/TransferQueue.cpp @@ -154,7 +154,7 @@ void TransferQueue::blitTileFromQueue(GLuint fboID, BaseTileTexture* destTex, // Use empty rect to set up the special matrix to draw. SkRect rect = SkRect::MakeEmpty(); TilesManager::instance()->shader()->drawQuad(rect, srcTexId, 1.0, - srcTexTarget); + srcTexTarget, GL_NEAREST); // To workaround a sync issue on some platforms, we should insert the sync // here while in the current FBO. |