|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
|
2 * vim: sw=2 ts=8 et : |
|
3 */ |
|
4 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
7 |
|
8 #ifndef MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H |
|
9 #define MOZILLA_LAYERS_COMPOSITABLETRANSACTIONPARENT_H |
|
10 |
|
11 #include <vector> // for vector |
|
12 #include "mozilla/Attributes.h" // for MOZ_OVERRIDE |
|
13 #include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator |
|
14 #include "mozilla/layers/LayersMessages.h" // for EditReply, etc |
|
15 |
|
16 namespace mozilla { |
|
17 namespace layers { |
|
18 |
|
19 class CompositableHost; |
|
20 |
|
21 typedef std::vector<mozilla::layers::EditReply> EditReplyVector; |
|
22 |
|
23 // Since PCompositble has two potential manager protocols, we can't just call |
|
24 // the Manager() method usually generated when there's one manager protocol, |
|
25 // so both manager protocols implement this and we keep a reference to them |
|
26 // through this interface. |
|
27 class CompositableParentManager : public ISurfaceAllocator |
|
28 { |
|
29 protected: |
|
30 /** |
|
31 * Handle the IPDL messages that affect PCompositable actors. |
|
32 */ |
|
33 bool ReceiveCompositableUpdate(const CompositableOperation& aEdit, |
|
34 EditReplyVector& replyv); |
|
35 bool IsOnCompositorSide() const MOZ_OVERRIDE { return true; } |
|
36 |
|
37 /** |
|
38 * Return true if this protocol is asynchronous with respect to the content |
|
39 * thread (ImageBridge for instance). |
|
40 */ |
|
41 virtual bool IsAsync() const { return false; } |
|
42 |
|
43 void ReturnTextureDataIfNecessary(CompositableHost* aCompositable, |
|
44 EditReplyVector& replyv, |
|
45 PCompositableParent* aParent); |
|
46 void ClearPrevFenceHandles(); |
|
47 |
|
48 protected: |
|
49 std::vector<FenceHandle> mPrevFenceHandles; |
|
50 }; |
|
51 |
|
52 } // namespace |
|
53 } // namespace |
|
54 |
|
55 #endif |