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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual ~WebTextureUpdater() { } | 42 virtual ~WebTextureUpdater() { } |
43 }; | 43 }; |
44 | 44 |
45 class WebExternalTextureLayerClient { | 45 class WebExternalTextureLayerClient { |
46 public: | 46 public: |
47 virtual unsigned prepareTexture(WebTextureUpdater&) = 0; | 47 virtual unsigned prepareTexture(WebTextureUpdater&) = 0; |
48 virtual WebGraphicsContext3D* context() = 0; | 48 virtual WebGraphicsContext3D* context() = 0; |
49 | 49 |
50 // Returns true and provides a mailbox if a new frame is available. | 50 // Returns true and provides a mailbox if a new frame is available. |
51 // Returns false if no new data is available and the old mailbox is to be re
used. | 51 // Returns false if no new data is available and the old mailbox is to be re
used. |
52 virtual bool prepareMailbox(WebExternalTextureMailbox*) = 0; | 52 // If bitmap is true the data should be put in a texture in the mailbox. |
| 53 virtual bool prepareMailbox(WebExternalTextureMailbox*, bool bitmap) = 0; |
| 54 |
| 55 // Obsolete. |
| 56 virtual bool prepareMailbox(WebExternalTextureMailbox* mailbox) { return pre
pareMailbox(mailbox, false); } |
53 | 57 |
54 // Notifies the client when a mailbox is no longer in use by the compositor
and provides | 58 // Notifies the client when a mailbox is no longer in use by the compositor
and provides |
55 // a sync point to wait on before the mailbox could be consumes again by the
client. | 59 // a sync point to wait on before the mailbox could be consumes again by the
client. |
56 virtual void mailboxReleased(const WebExternalTextureMailbox&) = 0; | 60 virtual void mailboxReleased(const WebExternalTextureMailbox&) = 0; |
57 | 61 |
58 protected: | 62 protected: |
59 virtual ~WebExternalTextureLayerClient() { } | 63 virtual ~WebExternalTextureLayerClient() { } |
60 }; | 64 }; |
61 | 65 |
62 } // namespace WebKit | 66 } // namespace WebKit |
63 | 67 |
64 #endif // WebExternalTextureLayerClient_h | 68 #endif // WebExternalTextureLayerClient_h |
OLD | NEW |