Backout changesets 8b67eb363e5c (bug 893824), 2f603fe51b71, d623d68577ec, 12adb590b761, e08e42b8435b (bug 900133) and c8230843d507 (bug 898129) for crashtest bustage on a CLOSED TREE
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 02 Aug 2013 15:35:25 +0900
changeset 141077 5e1009e4b1e1b77c88ac1db43c158660107289f8
parent 141076 f38eafe79c95b4c549d6847fba8f1ee95492595d
child 141078 7d582e8caa9676ae028ede34dcdf71184caa8543
push id25046
push useremorley@mozilla.com
push dateFri, 02 Aug 2013 12:29:51 +0000
treeherdermozilla-central@04dd60bdbc04 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs893824, 900133, 898129
milestone25.0a1
backs out8b67eb363e5c0e8e773e4b4cb4dec38af8651474
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout changesets 8b67eb363e5c (bug 893824), 2f603fe51b71, d623d68577ec, 12adb590b761, e08e42b8435b (bug 900133) and c8230843d507 (bug 898129) for crashtest bustage on a CLOSED TREE
gfx/2d/Factory.cpp
gfx/2d/SourceSurfaceCG.cpp
gfx/layers/composite/CanvasLayerComposite.cpp
gfx/layers/composite/ColorLayerComposite.cpp
gfx/layers/composite/CompositableHost.cpp
gfx/layers/composite/CompositableHost.h
gfx/layers/composite/ContainerLayerComposite.cpp
gfx/layers/composite/ImageHost.cpp
gfx/layers/composite/ImageLayerComposite.cpp
gfx/layers/composite/LayerManagerComposite.cpp
gfx/layers/composite/LayerManagerComposite.h
gfx/layers/composite/TextureHost.cpp
gfx/layers/composite/ThebesLayerComposite.cpp
gfx/layers/ipc/ShadowLayers.cpp
gfx/layers/opengl/ColorLayerOGL.cpp
gfx/layers/opengl/CompositorOGL.cpp
gfx/layers/opengl/LayerManagerOGLProgram.cpp
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -568,20 +568,16 @@ Factory::CreateDrawTargetForCairoCGConte
 }
 #endif
 
 TemporaryRef<DataSourceSurface>
 Factory::CreateWrappingDataSourceSurface(uint8_t *aData, int32_t aStride,
                                          const IntSize &aSize,
                                          SurfaceFormat aFormat)
 {
-  if (aSize.width <= 0 || aSize.height <= 0) {
-    return nullptr;
-  }
-
   RefPtr<SourceSurfaceRawData> newSurf = new SourceSurfaceRawData();
 
   if (newSurf->InitWrappingData(aData, aSize, aStride, aFormat, false)) {
     return newSurf;
   }
 
   return nullptr;
 }
--- a/gfx/2d/SourceSurfaceCG.cpp
+++ b/gfx/2d/SourceSurfaceCG.cpp
@@ -152,31 +152,22 @@ DataSourceSurfaceCG::GetSize() const
 }
 
 bool
 DataSourceSurfaceCG::InitFromData(unsigned char *aData,
                                const IntSize &aSize,
                                int32_t aStride,
                                SurfaceFormat aFormat)
 {
-  if (aSize.width <= 0 || aSize.height <= 0) {
-    return false;
-  }
-
   void *data = malloc(aStride * aSize.height);
   memcpy(data, aData, aStride * aSize.height);
 
   mImage = CreateCGImage(data, data, aSize, aStride, aFormat);
 
-  if (!mImage) {
-    delete data;
-    return false;
-  }
-
-  return true;
+  return mImage;
 }
 
 CGContextRef CreateBitmapContextForImage(CGImageRef image)
 {
   CGColorSpaceRef colorSpace;
 
   size_t width  = CGImageGetWidth(image);
   size_t height = CGImageGetHeight(image);
--- a/gfx/layers/composite/CanvasLayerComposite.cpp
+++ b/gfx/layers/composite/CanvasLayerComposite.cpp
@@ -88,18 +88,16 @@ CanvasLayerComposite::RenderLayer(const 
   gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
 
   mImageHost->Composite(effectChain,
                         GetEffectiveOpacity(),
                         transform,
                         gfx::Point(aOffset.x, aOffset.y),
                         gfx::ToFilter(filter),
                         clipRect);
-
-  LayerManagerComposite::RemoveMaskEffect(mMaskLayer);
 }
 
 CompositableHost*
 CanvasLayerComposite::GetCompositableHost() {
   return mImageHost.get();
 }
 
 void
--- a/gfx/layers/composite/ColorLayerComposite.cpp
+++ b/gfx/layers/composite/ColorLayerComposite.cpp
@@ -35,13 +35,12 @@ ColorLayerComposite::RenderLayer(const n
   ToMatrix4x4(GetEffectiveTransform(), transform);
 
   mCompositor->DrawQuad(rect, clipRect, effects, opacity,
                         transform, gfx::Point(aOffset.x, aOffset.y));
   mCompositor->DrawDiagnostics(gfx::Color(0.0, 1.0, 1.0, 1.0),
                                rect, clipRect,
                                transform, gfx::Point(aOffset.x, aOffset.y));
 
-  LayerManagerComposite::RemoveMaskEffect(GetMaskLayer());
 }
 
 } /* layers */
 } /* mozilla */
--- a/gfx/layers/composite/CompositableHost.cpp
+++ b/gfx/layers/composite/CompositableHost.cpp
@@ -99,56 +99,31 @@ CompositableHost::Update(const SurfaceDe
   return GetDeprecatedTextureHost()->IsValid();
 }
 
 bool
 CompositableHost::AddMaskEffect(EffectChain& aEffects,
                                 const gfx::Matrix4x4& aTransform,
                                 bool aIs3D)
 {
-  RefPtr<TextureSource> source;
-  RefPtr<DeprecatedTextureHost> oldHost = GetDeprecatedTextureHost();
-  if (oldHost) {
-    oldHost->Lock();
-    source = oldHost;
-  } else {
-    RefPtr<TextureHost> host = GetTextureHost();
-    if (host) {
-      host->Lock();
-      source = host->GetTextureSources();
-    }
-  }
+  RefPtr<TextureSource> source = GetDeprecatedTextureHost();
 
   if (!source) {
     NS_WARNING("Using compositable with no texture host as mask layer");
     return false;
   }
 
   RefPtr<EffectMask> effect = new EffectMask(source,
                                              source->GetSize(),
                                              aTransform);
   effect->mIs3D = aIs3D;
   aEffects.mSecondaryEffects[EFFECT_MASK] = effect;
   return true;
 }
 
-void
-CompositableHost::RemoveMaskEffect()
-{
-  RefPtr<DeprecatedTextureHost> oldHost = GetDeprecatedTextureHost();
-  if (oldHost) {
-    oldHost->Unlock();
-  } else {
-    RefPtr<TextureHost> host = GetTextureHost();
-    if (host) {
-      host->Unlock();
-    }
-  }
-}
-
 /* static */ TemporaryRef<CompositableHost>
 CompositableHost::Create(const TextureInfo& aTextureInfo)
 {
   RefPtr<CompositableHost> result;
   switch (aTextureInfo.mCompositableType) {
   case COMPOSITABLE_IMAGE:
     result = new ImageHost(aTextureInfo);
     return result;
--- a/gfx/layers/composite/CompositableHost.h
+++ b/gfx/layers/composite/CompositableHost.h
@@ -167,18 +167,16 @@ public:
   /**
    * Adds a mask effect using this texture as the mask, if possible.
    * @return true if the effect was added, false otherwise.
    */
   bool AddMaskEffect(EffectChain& aEffects,
                      const gfx::Matrix4x4& aTransform,
                      bool aIs3D = false);
 
-  void RemoveMaskEffect();
-
   Compositor* GetCompositor() const
   {
     return mCompositor;
   }
 
   Layer* GetLayer() const { return mLayer; }
   void SetLayer(Layer* aLayer) { mLayer = aLayer; }
 
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -158,18 +158,16 @@ ContainerRender(ContainerT* aContainer,
     const FrameMetrics& frame = aContainer->GetFrameMetrics();
     LayerRect layerViewport = frame.mViewport * frame.LayersPixelsPerCSSPixel();
     gfx::Rect rect(layerViewport.x, layerViewport.y, layerViewport.width, layerViewport.height);
     gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
     aManager->GetCompositor()->DrawDiagnostics(gfx::Color(1.0, 0.0, 0.0, 1.0),
                                                rect, clipRect,
                                                transform, gfx::Point(aOffset.x, aOffset.y));
   }
-
-  LayerManagerComposite::RemoveMaskEffect(aContainer->GetMaskLayer());
 }
 
 ContainerLayerComposite::ContainerLayerComposite(LayerManagerComposite *aManager)
   : ContainerLayer(aManager, nullptr)
   , LayerComposite(aManager)
 {
   MOZ_COUNT_CTOR(ContainerLayerComposite);
   mImplData = static_cast<LayerComposite*>(this);
--- a/gfx/layers/composite/ImageHost.cpp
+++ b/gfx/layers/composite/ImageHost.cpp
@@ -62,53 +62,38 @@ ImageHost::Composite(EffectChain& aEffec
   RefPtr<NewTextureSource> source = mFrontBuffer->GetTextureSources();
   if (!source) {
     return;
   }
   RefPtr<TexturedEffect> effect = CreateTexturedEffect(mFrontBuffer->GetFormat(),
                                                        source,
                                                        aFilter);
   aEffectChain.mPrimaryEffect = effect;
-
-  gfx::Rect pictureRect(0, 0,
-                        mPictureRect.width,
-                        mPictureRect.height);
-  //XXX: We might have multiple texture sources here (e.g. 3 YCbCr textures), and we're
-  // only iterating over the tiles of the first one. Are we assuming that the tiling
-  // will be identical? Can we ensure that somehow?
   TileIterator* it = source->AsTileIterator();
   if (it) {
     it->BeginTileIteration();
     do {
       nsIntRect tileRect = it->GetTileRect();
       gfx::Rect rect(tileRect.x, tileRect.y, tileRect.width, tileRect.height);
-      if (mHasPictureRect) {
-        rect = rect.Intersect(pictureRect);
-        effect->mTextureCoords = Rect(Float(rect.x - tileRect.x)/ tileRect.width,
-                                      Float(rect.y - tileRect.y) / tileRect.height,
-                                      Float(rect.width) / tileRect.width,
-                                      Float(rect.height) / tileRect.height);
-      } else {
-        effect->mTextureCoords = Rect(0, 0, 1, 1);
-      }
       GetCompositor()->DrawQuad(rect, aClipRect, aEffectChain,
                                 aOpacity, aTransform, aOffset);
       GetCompositor()->DrawDiagnostics(gfx::Color(0.5,0.0,0.0,1.0),
                                        rect, aClipRect, aTransform, aOffset);
     } while (it->NextTile());
     it->EndTileIteration();
   } else {
     IntSize textureSize = source->GetSize();
-    gfx::Rect rect;
+    gfx::Rect rect(0, 0,
+                   mPictureRect.width,
+                   mPictureRect.height);
     if (mHasPictureRect) {
       effect->mTextureCoords = Rect(Float(mPictureRect.x) / textureSize.width,
                                     Float(mPictureRect.y) / textureSize.height,
                                     Float(mPictureRect.width) / textureSize.width,
                                     Float(mPictureRect.height) / textureSize.height);
-      rect = pictureRect;
     } else {
       effect->mTextureCoords = Rect(0, 0, 1, 1);
       rect = gfx::Rect(0, 0, textureSize.width, textureSize.height);
     }
 
     if (mFrontBuffer->GetFlags() & NeedsYFlip) {
       effect->mTextureCoords.y = effect->mTextureCoords.YMost();
       effect->mTextureCoords.height = -effect->mTextureCoords.height;
--- a/gfx/layers/composite/ImageLayerComposite.cpp
+++ b/gfx/layers/composite/ImageLayerComposite.cpp
@@ -91,18 +91,16 @@ ImageLayerComposite::RenderLayer(const n
   gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
   mImageHost->SetCompositor(mCompositor);
   mImageHost->Composite(effectChain,
                         GetEffectiveOpacity(),
                         transform,
                         gfx::Point(aOffset.x, aOffset.y),
                         gfx::ToFilter(mFilter),
                         clipRect);
-
-  LayerManagerComposite::RemoveMaskEffect(mMaskLayer);
 }
 
 void 
 ImageLayerComposite::ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface)
 {
   gfx3DMatrix local = GetLocalTransform();
 
   // Snap image edges to pixel boundaries
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -656,31 +656,16 @@ LayerManagerComposite::AddMaskEffect(Lay
     return false;
   }
 
   gfx::Matrix4x4 transform;
   ToMatrix4x4(aMaskLayer->GetEffectiveTransform(), transform);
   return maskLayerComposite->GetCompositableHost()->AddMaskEffect(aEffects, transform, aIs3D);
 }
 
-/* static */ void
-LayerManagerComposite::RemoveMaskEffect(Layer* aMaskLayer)
-{
-  if (!aMaskLayer) {
-    return;
-  }
-  LayerComposite* maskLayerComposite = static_cast<LayerComposite*>(aMaskLayer->ImplData());
-  if (!maskLayerComposite->GetCompositableHost()) {
-    NS_WARNING("Mask layer with no compositable host");
-    return;
-  }
-
-  maskLayerComposite->GetCompositableHost()->RemoveMaskEffect();
-}
-
 TemporaryRef<DrawTarget>
 LayerManagerComposite::CreateDrawTarget(const IntSize &aSize,
                                         SurfaceFormat aFormat)
 {
 #ifdef XP_MACOSX
   // We don't want to accelerate if the surface is too small which indicates
   // that it's likely used for an icon/static image. We also don't want to
   // accelerate anything that is above the maximum texture size of weakest gpu.
--- a/gfx/layers/composite/LayerManagerComposite.h
+++ b/gfx/layers/composite/LayerManagerComposite.h
@@ -160,18 +160,16 @@ public:
    */
   void SetWorldTransform(const gfxMatrix& aMatrix);
   gfxMatrix& GetWorldTransform(void);
 
   static bool AddMaskEffect(Layer* aMaskLayer,
                             EffectChain& aEffect,
                             bool aIs3D = false);
 
-  static void RemoveMaskEffect(Layer* aMaskLayer);
-
   /**
    * Creates a DrawTarget which is optimized for inter-operating with this
    * layermanager.
    */
   virtual TemporaryRef<mozilla::gfx::DrawTarget>
     CreateDrawTarget(const mozilla::gfx::IntSize &aSize,
                      mozilla::gfx::SurfaceFormat aFormat) MOZ_OVERRIDE;
 
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -449,17 +449,17 @@ MemoryTextureHost::MemoryTextureHost(uin
 , mBuffer(aBuffer)
 {
   MOZ_COUNT_CTOR(MemoryTextureHost);
 }
 
 MemoryTextureHost::~MemoryTextureHost()
 {
   DeallocateDeviceData();
-  MOZ_COUNT_DTOR(MemoryTextureHost);
+  MOZ_COUNT_DTOR(ShmemTextureHost);
 }
 
 void
 MemoryTextureHost::DeallocateSharedData()
 {
   delete[] mBuffer;
 }
 
--- a/gfx/layers/composite/ThebesLayerComposite.cpp
+++ b/gfx/layers/composite/ThebesLayerComposite.cpp
@@ -135,17 +135,16 @@ ThebesLayerComposite::RenderLayer(const 
                      mRequiresTiledProperties ? &tiledLayerProps
                                               : nullptr);
 
 
   if (mRequiresTiledProperties) {
     mValidRegion = tiledLayerProps.mValidRegion;
   }
 
-  LayerManagerComposite::RemoveMaskEffect(mMaskLayer);
   mCompositeManager->GetCompositor()->MakeCurrent();
 }
 
 CompositableHost*
 ThebesLayerComposite::GetCompositableHost() {
   return mBuffer.get();
 }
 
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -400,16 +400,17 @@ ShadowLayerForwarder::RemoveTexture(Comp
                 aFlags));
 }
 
 void
 ShadowLayerForwarder::UpdatedTexture(CompositableClient* aCompositable,
                                      TextureClient* aTexture,
                                      nsIntRegion* aRegion)
 {
+  printf("ShadowLayerForwarder::UpdatedTexture %i\n", (int)aTexture->GetID());
   MaybeRegion region = aRegion ? MaybeRegion(*aRegion)
                                : MaybeRegion(null_t());
   mTxn->AddEdit(OpUpdateTexture(nullptr, aCompositable->GetIPDLActor(),
                                 aTexture->GetID(),
                                 region));
 }
 
 void
--- a/gfx/layers/opengl/ColorLayerOGL.cpp
+++ b/gfx/layers/opengl/ColorLayerOGL.cpp
@@ -32,16 +32,17 @@ RenderColorLayer(ColorLayer* aLayer, Lay
   color.b *= opacity;
   color.a = opacity;
 
   ShaderProgramOGL *program = aManager->GetProgram(ColorLayerProgramType,
                                                    aLayer->GetMaskLayer());
   program->Activate();
   program->SetLayerQuadRect(aLayer->GetBounds());
   program->SetLayerTransform(aLayer->GetEffectiveTransform());
+  program->SetTextureTransform(gfx3DMatrix());
   program->SetRenderOffset(aOffset);
   program->SetRenderColor(color);
   program->LoadMask(aLayer->GetMaskLayer());
 
   aManager->BindAndDrawQuad(program);
 }
 
 void
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1033,16 +1033,17 @@ CompositorOGL::DrawQuad(const Rect& aRec
     TexturedEffect* texturedEffect =
         static_cast<TexturedEffect*>(aEffectChain.mPrimaryEffect.get());
     TextureSourceOGL* source = texturedEffect->mTexture->AsSourceOGL();
     // This is used by IOSurface that use 0,0...w,h coordinate rather then 0,0..1,1.
     program->SetTexCoordMultiplier(source->GetSize().width, source->GetSize().height);
   }
   program->SetLayerQuadRect(aRect);
   program->SetLayerTransform(aTransform);
+  program->SetTextureTransform(gfx3DMatrix());
   program->SetRenderOffset(aOffset.x, aOffset.y);
 
   switch (aEffectChain.mPrimaryEffect->mType) {
     case EFFECT_SOLID_COLOR: {
       EffectSolidColor* effectSolidColor =
         static_cast<EffectSolidColor*>(aEffectChain.mPrimaryEffect.get());
 
       Color color = effectSolidColor->mColor;
@@ -1130,17 +1131,16 @@ CompositorOGL::DrawQuad(const Rect& aRec
       mGLContext->ApplyFilterToBoundTexture(filter);
       AutoBindTexture bindCb(sourceCb, LOCAL_GL_TEXTURE1);
       mGLContext->ApplyFilterToBoundTexture(filter);
       AutoBindTexture bindCr(sourceCr, LOCAL_GL_TEXTURE2);
       mGLContext->ApplyFilterToBoundTexture(filter);
 
       program->SetYCbCrTextureUnits(Y, Cb, Cr);
       program->SetLayerOpacity(aOpacity);
-      program->SetTextureTransform(gfx3DMatrix());
 
       AutoBindTexture bindMask;
       if (maskType != MaskNone) {
         bindMask.Bind(sourceMask, LOCAL_GL_TEXTURE3);
         program->SetMaskTextureUnit(3);
         program->SetMaskLayerTransform(maskQuadTransform);
       }
       BindAndDrawQuadWithTextureRect(program, effectYCbCr->mTextureCoords, sourceYCbCr->GetSubSource(Y));
@@ -1154,17 +1154,16 @@ CompositorOGL::DrawQuad(const Rect& aRec
 
       ShaderProgramOGL *program = GetProgram(GetFBOLayerProgramType(), maskType);
 
       surface->BindTexture(LOCAL_GL_TEXTURE0, mFBOTextureTarget);
 
       program->Activate();
       program->SetTextureUnit(0);
       program->SetLayerOpacity(aOpacity);
-      program->SetTextureTransform(gfx3DMatrix());
 
       AutoBindTexture bindMask;
       if (maskType != MaskNone) {
         bindMask.Bind(sourceMask, LOCAL_GL_TEXTURE1);
         program->SetMaskTextureUnit(1);
         program->SetMaskLayerTransform(maskQuadTransform);
       }
 
--- a/gfx/layers/opengl/LayerManagerOGLProgram.cpp
+++ b/gfx/layers/opengl/LayerManagerOGLProgram.cpp
@@ -17,27 +17,27 @@ namespace layers {
 typedef ProgramProfileOGL::Argument Argument;
 
 // helper methods for GetProfileFor
 void
 AddCommonArgs(ProgramProfileOGL& aProfile)
 {
   aProfile.mUniforms.AppendElement(Argument("uLayerTransform"));
   aProfile.mUniforms.AppendElement(Argument("uLayerQuadTransform"));
+  aProfile.mUniforms.AppendElement(Argument("uTextureTransform"));
   aProfile.mUniforms.AppendElement(Argument("uMatrixProj"));
   aProfile.mHasMatrixProj = true;
   aProfile.mUniforms.AppendElement(Argument("uRenderTargetOffset"));
   aProfile.mAttributes.AppendElement(Argument("aVertexCoord"));
 }
 void
 AddCommonTextureArgs(ProgramProfileOGL& aProfile)
 {
   aProfile.mUniforms.AppendElement(Argument("uLayerOpacity"));
   aProfile.mUniforms.AppendElement(Argument("uTexture"));
-  aProfile.mUniforms.AppendElement(Argument("uTextureTransform"));
   aProfile.mAttributes.AppendElement(Argument("aTexCoord"));
 }
 
 /* static */ ProgramProfileOGL
 ProgramProfileOGL::GetProfileFor(ShaderProgramType aType,
                                  MaskType aMask)
 {
   NS_ASSERTION(ProgramExists(aType, aMask), "Invalid program type.");
@@ -167,100 +167,93 @@ ProgramProfileOGL::GetProfileFor(ShaderP
       result.mVertexShaderString = sLayerVS;
       result.mFragmentShaderString = sYCbCrTextureLayerFS;
     }
     AddCommonArgs(result);
     result.mUniforms.AppendElement(Argument("uLayerOpacity"));
     result.mUniforms.AppendElement(Argument("uYTexture"));
     result.mUniforms.AppendElement(Argument("uCbTexture"));
     result.mUniforms.AppendElement(Argument("uCrTexture"));
-    result.mUniforms.AppendElement(Argument("uTextureTransform"));
     result.mAttributes.AppendElement(Argument("aTexCoord"));
     result.mTextureCount = 3;
     break;
   case ComponentAlphaPass1ProgramType:
     if (aMask == Mask2d) {
       result.mVertexShaderString = sLayerMaskVS;
       result.mFragmentShaderString = sComponentPassMask1FS;
     } else {
       result.mVertexShaderString = sLayerVS;
       result.mFragmentShaderString = sComponentPass1FS;
     }
     AddCommonArgs(result);
     result.mUniforms.AppendElement(Argument("uLayerOpacity"));
     result.mUniforms.AppendElement(Argument("uBlackTexture"));
     result.mUniforms.AppendElement(Argument("uWhiteTexture"));
-    result.mUniforms.AppendElement(Argument("uTextureTransform"));
     result.mAttributes.AppendElement(Argument("aTexCoord"));
     result.mTextureCount = 2;
     break;
   case ComponentAlphaPass1RGBProgramType:
     if (aMask == Mask2d) {
       result.mVertexShaderString = sLayerMaskVS;
       result.mFragmentShaderString = sComponentPassMask1RGBFS;
     } else {
       result.mVertexShaderString = sLayerVS;
       result.mFragmentShaderString = sComponentPass1RGBFS;
     }
     AddCommonArgs(result);
     result.mUniforms.AppendElement(Argument("uLayerOpacity"));
     result.mUniforms.AppendElement(Argument("uBlackTexture"));
     result.mUniforms.AppendElement(Argument("uWhiteTexture"));
-    result.mUniforms.AppendElement(Argument("uTextureTransform"));
     result.mAttributes.AppendElement(Argument("aTexCoord"));
     result.mTextureCount = 2;
     break;
   case ComponentAlphaPass2ProgramType:
     if (aMask == Mask2d) {
       result.mVertexShaderString = sLayerMaskVS;
       result.mFragmentShaderString = sComponentPassMask2FS;
     } else {
       result.mVertexShaderString = sLayerVS;
       result.mFragmentShaderString = sComponentPass2FS;
     }
     AddCommonArgs(result);
     result.mUniforms.AppendElement(Argument("uLayerOpacity"));
     result.mUniforms.AppendElement(Argument("uBlackTexture"));
     result.mUniforms.AppendElement(Argument("uWhiteTexture"));
-    result.mUniforms.AppendElement(Argument("uTextureTransform"));
     result.mAttributes.AppendElement(Argument("aTexCoord"));
     result.mTextureCount = 2;
     break;
   case ComponentAlphaPass2RGBProgramType:
     if (aMask == Mask2d) {
       result.mVertexShaderString = sLayerMaskVS;
       result.mFragmentShaderString = sComponentPassMask2RGBFS;
     } else {
       result.mVertexShaderString = sLayerVS;
       result.mFragmentShaderString = sComponentPass2RGBFS;
     }
     AddCommonArgs(result);
     result.mUniforms.AppendElement(Argument("uLayerOpacity"));
     result.mUniforms.AppendElement(Argument("uBlackTexture"));
     result.mUniforms.AppendElement(Argument("uWhiteTexture"));
-    result.mUniforms.AppendElement(Argument("uTextureTransform"));
     result.mAttributes.AppendElement(Argument("aTexCoord"));
     result.mTextureCount = 2;
     break;
   case Copy2DProgramType:
     NS_ASSERTION(!aMask, "Program does not have masked variant.");
     result.mVertexShaderString = sCopyVS;
     result.mFragmentShaderString = sCopy2DFS;
     result.mUniforms.AppendElement(Argument("uTexture"));
-    result.mUniforms.AppendElement(Argument("uTextureTransform"));
     result.mAttributes.AppendElement(Argument("aVertexCoord"));
     result.mAttributes.AppendElement(Argument("aTexCoord"));
     result.mTextureCount = 1;
     break;
   case Copy2DRectProgramType:
     NS_ASSERTION(!aMask, "Program does not have masked variant.");
     result.mVertexShaderString = sCopyVS;
     result.mFragmentShaderString = sCopy2DRectFS;
     result.mUniforms.AppendElement(Argument("uTexture"));
-    result.mUniforms.AppendElement(Argument("uTextureTransform"));
     result.mAttributes.AppendElement(Argument("aVertexCoord"));
     result.mAttributes.AppendElement(Argument("aTexCoord"));
     result.mTextureCount = 1;
     break;
   default:
     NS_NOTREACHED("Unknown shader program type.");
   }