| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "core/platform/graphics/GraphicsTypes3D.h" | 35 #include "core/platform/graphics/GraphicsTypes3D.h" |
| 36 #include "core/platform/graphics/IntSize.h" | 36 #include "core/platform/graphics/IntSize.h" |
| 37 | 37 |
| 38 #include "public/platform/WebExternalTextureLayerClient.h" | 38 #include "public/platform/WebExternalTextureLayerClient.h" |
| 39 #include "public/platform/WebExternalTextureMailbox.h" | 39 #include "public/platform/WebExternalTextureMailbox.h" |
| 40 #include <wtf/Noncopyable.h> | 40 #include <wtf/Noncopyable.h> |
| 41 #include <wtf/OwnPtr.h> | 41 #include <wtf/OwnPtr.h> |
| 42 #include <wtf/PassOwnPtr.h> | 42 #include <wtf/PassOwnPtr.h> |
| 43 | 43 |
| 44 namespace WebKit { | 44 namespace WebKit { |
| 45 class WebExternalBitmap; |
| 45 class WebExternalTextureLayer; | 46 class WebExternalTextureLayer; |
| 46 class WebGraphicsContext3D; | 47 class WebGraphicsContext3D; |
| 47 class WebLayer; | 48 class WebLayer; |
| 48 } | 49 } |
| 49 | 50 |
| 50 namespace WebCore { | 51 namespace WebCore { |
| 51 class GraphicsContext3D; | 52 class GraphicsContext3D; |
| 52 class ImageData; | 53 class ImageData; |
| 53 | 54 |
| 54 // Abstract interface to allow basic context eviction management | 55 // Abstract interface to allow basic context eviction management |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 Platform3DObject framebuffer() const; | 119 Platform3DObject framebuffer() const; |
| 119 | 120 |
| 120 void markContentsChanged() { m_contentsChanged = true; } | 121 void markContentsChanged() { m_contentsChanged = true; } |
| 121 | 122 |
| 122 WebKit::WebLayer* platformLayer(); | 123 WebKit::WebLayer* platformLayer(); |
| 123 void paintCompositedResultsToCanvas(ImageBuffer*); | 124 void paintCompositedResultsToCanvas(ImageBuffer*); |
| 124 | 125 |
| 125 // WebExternalTextureLayerClient implementation. | 126 // WebExternalTextureLayerClient implementation. |
| 126 virtual unsigned prepareTexture(WebKit::WebTextureUpdater& updater) OVERRIDE
; | 127 virtual unsigned prepareTexture(WebKit::WebTextureUpdater& updater) OVERRIDE
; |
| 127 virtual WebKit::WebGraphicsContext3D* context() OVERRIDE; | 128 virtual WebKit::WebGraphicsContext3D* context() OVERRIDE; |
| 128 virtual bool prepareMailbox(WebKit::WebExternalTextureMailbox*) OVERRIDE; | 129 virtual bool prepareMailbox(WebKit::WebExternalTextureMailbox*, WebKit::WebE
xternalBitmap*) OVERRIDE; |
| 129 virtual void mailboxReleased(const WebKit::WebExternalTextureMailbox&) OVERR
IDE; | 130 virtual void mailboxReleased(const WebKit::WebExternalTextureMailbox&) OVERR
IDE; |
| 130 | 131 |
| 131 private: | 132 private: |
| 132 DrawingBuffer(GraphicsContext3D*, const IntSize&, bool multisampleExtensionS
upported, | 133 DrawingBuffer(GraphicsContext3D*, const IntSize&, bool multisampleExtensionS
upported, |
| 133 bool packedDepthStencilExtensionSupported, PreserveDrawingBuff
er, PassRefPtr<ContextEvictionManager>); | 134 bool packedDepthStencilExtensionSupported, PreserveDrawingBuff
er, PassRefPtr<ContextEvictionManager>); |
| 134 | 135 |
| 135 void initialize(const IntSize&); | 136 void initialize(const IntSize&); |
| 136 | 137 |
| 137 void prepareBackBuffer(); | 138 void prepareBackBuffer(); |
| 138 bool requiresCopyFromBackToFrontBuffer() const; | 139 bool requiresCopyFromBackToFrontBuffer() const; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // Mailboxes that were released by the compositor and can be used again by t
his DrawingBuffer. | 208 // Mailboxes that were released by the compositor and can be used again by t
his DrawingBuffer. |
| 208 Vector<RefPtr<MailboxInfo> > m_recycledMailboxes; | 209 Vector<RefPtr<MailboxInfo> > m_recycledMailboxes; |
| 209 RefPtr<MailboxInfo> m_lastColorBuffer; | 210 RefPtr<MailboxInfo> m_lastColorBuffer; |
| 210 | 211 |
| 211 RefPtr<ContextEvictionManager> m_contextEvictionManager; | 212 RefPtr<ContextEvictionManager> m_contextEvictionManager; |
| 212 }; | 213 }; |
| 213 | 214 |
| 214 } // namespace WebCore | 215 } // namespace WebCore |
| 215 | 216 |
| 216 #endif // DrawingBuffer_h | 217 #endif // DrawingBuffer_h |
| OLD | NEW |