Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: Source/platform/graphics/gpu/DrawingBuffer.h

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef DrawingBuffer_h 31 #ifndef DrawingBuffer_h
32 #define DrawingBuffer_h 32 #define DrawingBuffer_h
33 33
34 #include "core/platform/graphics/GraphicsContext3D.h" 34 #include "platform/PlatformExport.h"
35 #include "platform/geometry/IntSize.h" 35 #include "platform/geometry/IntSize.h"
36 #include "platform/graphics/GraphicsContext3D.h"
36 #include "platform/graphics/GraphicsTypes3D.h" 37 #include "platform/graphics/GraphicsTypes3D.h"
37 38
38 #include "public/platform/WebExternalTextureLayerClient.h" 39 #include "public/platform/WebExternalTextureLayerClient.h"
39 #include "public/platform/WebExternalTextureMailbox.h" 40 #include "public/platform/WebExternalTextureMailbox.h"
40 #include "wtf/Noncopyable.h" 41 #include "wtf/Noncopyable.h"
41 #include "wtf/OwnPtr.h" 42 #include "wtf/OwnPtr.h"
42 #include "wtf/PassOwnPtr.h" 43 #include "wtf/PassOwnPtr.h"
43 44
44 namespace blink { 45 namespace blink {
45 class WebExternalBitmap; 46 class WebExternalBitmap;
46 class WebExternalTextureLayer; 47 class WebExternalTextureLayer;
47 class WebGraphicsContext3D; 48 class WebGraphicsContext3D;
48 class WebLayer; 49 class WebLayer;
49 } 50 }
50 51
51 namespace WebCore { 52 namespace WebCore {
52 class GraphicsContext3D; 53 class GraphicsContext3D;
53 class ImageData; 54 class ImageData;
54 55
55 // Abstract interface to allow basic context eviction management 56 // Abstract interface to allow basic context eviction management
56 class ContextEvictionManager : public RefCounted<ContextEvictionManager> { 57 class PLATFORM_EXPORT ContextEvictionManager : public RefCounted<ContextEviction Manager> {
57 public: 58 public:
58 virtual ~ContextEvictionManager() {}; 59 virtual ~ContextEvictionManager() {};
59 60
60 virtual void forciblyLoseOldestContext(const String& reason) = 0; 61 virtual void forciblyLoseOldestContext(const String& reason) = 0;
61 virtual IntSize oldestContextSize() = 0; 62 virtual IntSize oldestContextSize() = 0;
62 }; 63 };
63 64
64 // Manages a rendering target (framebuffer + attachment) for a canvas. Can publ ish its rendering 65 // Manages a rendering target (framebuffer + attachment) for a canvas. Can publ ish its rendering
65 // results to a blink::WebLayer for compositing. 66 // results to a blink::WebLayer for compositing.
66 class DrawingBuffer : public RefCounted<DrawingBuffer>, public blink::WebExterna lTextureLayerClient { 67 class PLATFORM_EXPORT DrawingBuffer : public RefCounted<DrawingBuffer>, public b link::WebExternalTextureLayerClient {
67 struct MailboxInfo : public RefCounted<MailboxInfo> { 68 struct MailboxInfo : public RefCounted<MailboxInfo> {
68 blink::WebExternalTextureMailbox mailbox; 69 blink::WebExternalTextureMailbox mailbox;
69 unsigned textureId; 70 unsigned textureId;
70 IntSize size; 71 IntSize size;
71 }; 72 };
72 public: 73 public:
73 enum PreserveDrawingBuffer { 74 enum PreserveDrawingBuffer {
74 Preserve, 75 Preserve,
75 Discard 76 Discard
76 }; 77 };
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Mailboxes that were released by the compositor and can be used again by t his DrawingBuffer. 210 // Mailboxes that were released by the compositor and can be used again by t his DrawingBuffer.
210 Vector<RefPtr<MailboxInfo> > m_recycledMailboxes; 211 Vector<RefPtr<MailboxInfo> > m_recycledMailboxes;
211 RefPtr<MailboxInfo> m_lastColorBuffer; 212 RefPtr<MailboxInfo> m_lastColorBuffer;
212 213
213 RefPtr<ContextEvictionManager> m_contextEvictionManager; 214 RefPtr<ContextEvictionManager> m_contextEvictionManager;
214 }; 215 };
215 216
216 } // namespace WebCore 217 } // namespace WebCore
217 218
218 #endif // DrawingBuffer_h 219 #endif // DrawingBuffer_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/fonts/FontFamilyNames.in ('k') | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698