Bug 909765 - Make TextureClient and CompositableClient ref counting thread-safe. r=sotaro, a=lsblakk
authorNicolas Silva <nical@mozilla.com>
Tue, 27 Aug 2013 17:03:58 +0200
changeset 153900 c258a05097e097ad02b576d80787bda151903e26
parent 153899 abbdc26298fa24d7e3404fe0dac41e8979b58843
child 153901 74a6ce7e36d7efc485b82a167effe9b888c43895
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro, lsblakk
Bug 909765 - Make TextureClient and CompositableClient ref counting thread-safe. r=sotaro, a=lsblakk
--- a/gfx/layers/client/CompositableClient.h
+++ b/gfx/layers/client/CompositableClient.h
@@ -57,17 +57,17 @@ class SurfaceDescriptor;
  * by this layer forwarder (the matching uses a global map on the compositor side,
  * see CompositableMap in ImageBridgeParent.cpp)
  * Subclasses: Thebes layers use ContentClients, ImageLayers use ImageClients,
  * Canvas layers use CanvasClients (but ImageHosts). We have a different subclass
  * where we have a different way of interfacing with the textures - in terms of
  * drawing into the compositable and/or passing its contents to the compostior.
-class CompositableClient : public RefCounted<CompositableClient>
+class CompositableClient : public AtomicRefCounted<CompositableClient>
   CompositableClient(CompositableForwarder* aForwarder);
   virtual ~CompositableClient();
   virtual TextureInfo GetTextureInfo() const = 0;
--- a/gfx/layers/client/TextureClient.h
+++ b/gfx/layers/client/TextureClient.h
@@ -79,17 +79,17 @@ public:
  * TextureClient/Host pair only owns one buffer of image data through its
  * lifetime. This means that to the lifetime of the underlying shared data
  * matches the lifetime of the TextureClient/Host pair. It also means
  * TextureClient/Host do not implement double buffering, which is the
  * responsibility of the compositable (which would use two Texture pairs).
  * In order to send several different buffers to the compositor side, use
  * several TextureClients.
-class TextureClient : public RefCounted<TextureClient>
+class TextureClient : public AtomicRefCounted<TextureClient>
   TextureClient(TextureFlags aFlags = TEXTURE_FLAGS_DEFAULT);
   virtual ~TextureClient();
   virtual TextureClientSurface* AsTextureClientSurface() { return nullptr; }
   virtual TextureClientYCbCr* AsTextureClientYCbCr() { return nullptr; }