Bug 915783 - [B2G][Browser][PDF]Graphical fragmentation occurs when viewing a pdf via browser. r=jgilbert
authorPeter Chang <pchang@mozilla.com>
Wed, 30 Oct 2013 15:21:22 -0400
changeset 152732 38f366acb59b827ea8805789197fcbf7644e2785
parent 152731 e1e249588a1c5dc782df60175e06649f3327e1d3
child 152733 08826e162b8a57ae2776750028fccdc95cc916b9
push id1959
push userryanvm@gmail.com
push dateWed, 30 Oct 2013 19:22:31 +0000
treeherderb2g-inbound@cc37dd2cd769 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs915783
milestone28.0a1
Bug 915783 - [B2G][Browser][PDF]Graphical fragmentation occurs when viewing a pdf via browser. r=jgilbert
gfx/gl/SharedSurfaceGralloc.cpp
--- a/gfx/gl/SharedSurfaceGralloc.cpp
+++ b/gfx/gl/SharedSurfaceGralloc.cpp
@@ -99,16 +99,22 @@ SharedSurface_Gralloc::Create(GLContext*
         allocator->DestroySharedSurface(&baseDesc);
         return nullptr;
     }
 
     prodGL->MakeCurrent();
     GLuint prodTex = 0;
     prodGL->fGenTextures(1, &prodTex);
     ScopedBindTexture autoTex(prodGL, prodTex);
+
+    prodGL->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
+    prodGL->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR);
+    prodGL->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
+    prodGL->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
+
     prodGL->fEGLImageTargetTexture2D(LOCAL_GL_TEXTURE_2D, image);
 
     egl->fDestroyImage(display, image);
 
     SharedSurface_Gralloc *surf = new SharedSurface_Gralloc(prodGL, size, hasAlpha, egl, allocator, desc, prodTex);
 
     DEBUG_PRINT("SharedSurface_Gralloc::Create: success -- surface %p, GraphicBuffer %p.\n", surf, buffer.get());