OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "WebCommon.h" | 29 #include "WebCommon.h" |
30 #include "WebSize.h" | 30 #include "WebSize.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class WebGraphicsContext3D; | 34 class WebGraphicsContext3D; |
35 class WebExternalBitmap; | 35 class WebExternalBitmap; |
36 struct WebExternalTextureMailbox; | 36 struct WebExternalTextureMailbox; |
37 | 37 |
38 class WebExternalTextureLayerClient { | 38 class BLINK_PLATFORM_EXPORT WebExternalTextureLayerClient { |
39 public: | 39 public: |
40 virtual WebGraphicsContext3D* context() = 0; | 40 virtual WebGraphicsContext3D* context() = 0; |
41 | 41 |
42 // Returns true and provides a mailbox if a new frame is available. If the W
ebExternalBitmap | 42 // Returns true and provides a mailbox if a new frame is available. If the W
ebExternalBitmap |
43 // isn't 0, then it should also be filled in with the contents of this frame
. | 43 // isn't 0, then it should also be filled in with the contents of this frame
. |
44 // Returns false if no new data is available and the old mailbox and bitmap
are to be reused. | 44 // Returns false if no new data is available and the old mailbox and bitmap
are to be reused. |
45 virtual bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap* =
0) = 0; | 45 virtual bool prepareMailbox(WebExternalTextureMailbox*, WebExternalBitmap* =
0) = 0; |
46 | 46 |
47 // Notifies the client when a mailbox is no longer in use by the compositor
and provides | 47 // Notifies the client when a mailbox is no longer in use by the compositor
and provides |
48 // a sync point to wait on before the mailbox could be consumes again by the
client. | 48 // a sync point to wait on before the mailbox could be consumes again by the
client. |
49 virtual void mailboxReleased(const WebExternalTextureMailbox&) = 0; | 49 virtual void mailboxReleased(const WebExternalTextureMailbox&) = 0; |
50 | 50 |
51 protected: | 51 protected: |
52 virtual ~WebExternalTextureLayerClient() { } | 52 virtual ~WebExternalTextureLayerClient() { } |
53 }; | 53 }; |
54 | 54 |
55 } // namespace blink | 55 } // namespace blink |
56 | 56 |
57 #endif // WebExternalTextureLayerClient_h | 57 #endif // WebExternalTextureLayerClient_h |
OLD | NEW |