1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/layers/ipc/CompositableTransactionParent.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,55 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * vim: sw=2 ts=8 et : 1.6 + */ 1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 + 1.11 +#ifndef MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H 1.12 +#define MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H 1.13 + 1.14 +#include <vector> // for vector 1.15 +#include "mozilla/Attributes.h" // for MOZ_OVERRIDE 1.16 +#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator 1.17 +#include "mozilla/layers/LayersMessages.h" // for EditReply, etc 1.18 + 1.19 +namespace mozilla { 1.20 +namespace layers { 1.21 + 1.22 +class CompositableHost; 1.23 + 1.24 +typedef std::vector<mozilla::layers::EditReply> EditReplyVector; 1.25 + 1.26 +// Since PCompositble has two potential manager protocols, we can't just call 1.27 +// the Manager() method usually generated when there's one manager protocol, 1.28 +// so both manager protocols implement this and we keep a reference to them 1.29 +// through this interface. 1.30 +class CompositableParentManager : public ISurfaceAllocator 1.31 +{ 1.32 +protected: 1.33 + /** 1.34 + * Handle the IPDL messages that affect PCompositable actors. 1.35 + */ 1.36 + bool ReceiveCompositableUpdate(const CompositableOperation& aEdit, 1.37 + EditReplyVector& replyv); 1.38 + bool IsOnCompositorSide() const MOZ_OVERRIDE { return true; } 1.39 + 1.40 + /** 1.41 + * Return true if this protocol is asynchronous with respect to the content 1.42 + * thread (ImageBridge for instance). 1.43 + */ 1.44 + virtual bool IsAsync() const { return false; } 1.45 + 1.46 + void ReturnTextureDataIfNecessary(CompositableHost* aCompositable, 1.47 + EditReplyVector& replyv, 1.48 + PCompositableParent* aParent); 1.49 + void ClearPrevFenceHandles(); 1.50 + 1.51 +protected: 1.52 + std::vector<FenceHandle> mPrevFenceHandles; 1.53 +}; 1.54 + 1.55 +} // namespace 1.56 +} // namespace 1.57 + 1.58 +#endif