Bug 1229780 - Remove TextureClientPool helper functions from ClientLayerManager, r=mwoodrow
authorJamie Nicol <jnicol@mozilla.com>
Wed, 02 Dec 2015 15:04:36 +0000
changeset 309583 3e4476c099f9b629663fe0d7a8f2d82414b840ce
parent 309582 8947743399375a912ba151c5d8bf1705bc5e6101
child 309584 57d9f788497722cb2fbd70d1831fec3a12485b59
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwoodrow
bugs1229780, 1209801
milestone45.0a1
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
Bug 1229780 - Remove TextureClientPool helper functions from ClientLayerManager, r=mwoodrow The fix for bug 1209801 made it so that TextureClientPools are distinguished by a TextureFlags parameter as well as a SurfaceFormat. The pools will create TextureClients satisfying both the requested flags and format parameters. The helper functions ReturnTextureClientDeferred, ReturnTextureClient, and ReportClientLost were updated to use the TextureFlags of the client to guess which pool the client came from. It is possible, however, for a TextureClient to have additional flags to those that the pool requested it have. This could then cause the clients to be returned to incorrect pools. Fortunately these helper functions were not being used anywhere, so remove them.
gfx/layers/client/ClientLayerManager.cpp
gfx/layers/client/ClientLayerManager.h
--- a/gfx/layers/client/ClientLayerManager.cpp
+++ b/gfx/layers/client/ClientLayerManager.cpp
@@ -712,34 +712,16 @@ ClientLayerManager::GetTexturePool(Surfa
                             gfxPrefs::LayersTileMaxPoolSize(),
                             gfxPrefs::LayersTileShrinkPoolTimeout(),
                             mForwarder));
 
   return mTexturePools.LastElement();
 }
 
 void
-ClientLayerManager::ReturnTextureClientDeferred(TextureClient& aClient) {
-  GetTexturePool(aClient.GetFormat(),
-                 aClient.GetFlags())->ReturnTextureClientDeferred(&aClient);
-}
-
-void
-ClientLayerManager::ReturnTextureClient(TextureClient& aClient) {
-  GetTexturePool(aClient.GetFormat(),
-                 aClient.GetFlags())->ReturnTextureClient(&aClient);
-}
-
-void
-ClientLayerManager::ReportClientLost(TextureClient& aClient) {
-  GetTexturePool(aClient.GetFormat(),
-                 aClient.GetFlags())->ReportClientLost();
-}
-
-void
 ClientLayerManager::ClearCachedResources(Layer* aSubtree)
 {
   if (mDestroyed) {
     // ClearCachedResource was already called by ClientLayerManager::Destroy
     return;
   }
   MOZ_ASSERT(!HasShadowManager() || !aSubtree);
   mForwarder->ClearCachedResources();
--- a/gfx/layers/client/ClientLayerManager.h
+++ b/gfx/layers/client/ClientLayerManager.h
@@ -118,21 +118,16 @@ public:
 
   virtual bool IsCompositingCheap() override;
   virtual bool HasShadowManagerInternal() const override { return HasShadowManager(); }
 
   virtual void SetIsFirstPaint() override;
 
   TextureClientPool* GetTexturePool(gfx::SurfaceFormat aFormat, TextureFlags aFlags);
 
-  /// Utility methods for managing texture clients.
-  void ReturnTextureClientDeferred(TextureClient& aClient);
-  void ReturnTextureClient(TextureClient& aClient);
-  void ReportClientLost(TextureClient& aClient);
-
   /**
    * Pass through call to the forwarder for nsPresContext's
    * CollectPluginGeometryUpdates. Passes widget configuration information
    * to the compositor for transmission to the chrome process. This
    * configuration gets set when the window paints.
    */
   void StorePluginWidgetConfigurations(const nsTArray<nsIWidget::Configuration>&
                                        aConfigurations) override;