michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=8 et : michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H michael@0: #define MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H michael@0: michael@0: #include // for vector michael@0: #include "mozilla/Attributes.h" // for MOZ_OVERRIDE michael@0: #include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator michael@0: #include "mozilla/layers/LayersMessages.h" // for EditReply, etc michael@0: michael@0: namespace mozilla { michael@0: namespace layers { michael@0: michael@0: class CompositableHost; michael@0: michael@0: typedef std::vector EditReplyVector; michael@0: michael@0: // Since PCompositble has two potential manager protocols, we can't just call michael@0: // the Manager() method usually generated when there's one manager protocol, michael@0: // so both manager protocols implement this and we keep a reference to them michael@0: // through this interface. michael@0: class CompositableParentManager : public ISurfaceAllocator michael@0: { michael@0: protected: michael@0: /** michael@0: * Handle the IPDL messages that affect PCompositable actors. michael@0: */ michael@0: bool ReceiveCompositableUpdate(const CompositableOperation& aEdit, michael@0: EditReplyVector& replyv); michael@0: bool IsOnCompositorSide() const MOZ_OVERRIDE { return true; } michael@0: michael@0: /** michael@0: * Return true if this protocol is asynchronous with respect to the content michael@0: * thread (ImageBridge for instance). michael@0: */ michael@0: virtual bool IsAsync() const { return false; } michael@0: michael@0: void ReturnTextureDataIfNecessary(CompositableHost* aCompositable, michael@0: EditReplyVector& replyv, michael@0: PCompositableParent* aParent); michael@0: void ClearPrevFenceHandles(); michael@0: michael@0: protected: michael@0: std::vector mPrevFenceHandles; michael@0: }; michael@0: michael@0: } // namespace michael@0: } // namespace michael@0: michael@0: #endif