OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 2012 Samsung Electronics | 2 Copyright (C) 2012 Samsung Electronics |
3 Copyright (C) 2012 Intel Corporation. All rights reserved. | 3 Copyright (C) 2012 Intel Corporation. All rights reserved. |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #endif | 52 #endif |
53 #if USE(GRAPHICS_SURFACE) | 53 #if USE(GRAPHICS_SURFACE) |
54 virtual IntSize platformLayerSize() const OVERRIDE; | 54 virtual IntSize platformLayerSize() const OVERRIDE; |
55 virtual uint32_t copyToGraphicsSurface() OVERRIDE; | 55 virtual uint32_t copyToGraphicsSurface() OVERRIDE; |
56 virtual GraphicsSurfaceToken graphicsSurfaceToken() const OVERRIDE; | 56 virtual GraphicsSurfaceToken graphicsSurfaceToken() const OVERRIDE; |
57 void didResizeCanvas(const IntSize&); | 57 void didResizeCanvas(const IntSize&); |
58 #endif | 58 #endif |
59 bool makeContextCurrent() const; | 59 bool makeContextCurrent() const; |
60 | 60 |
61 private: | 61 private: |
62 #if USE(GRAPHICS_SURFACE) | |
63 enum PendingOperation { | |
64 Default = 0x00, // No Pending Operation. | |
65 CreateSurface = 0x01, | |
66 Resize = 0x02, | |
67 DeletePreviousSurface = 0x04 | |
68 }; | |
69 | |
70 typedef unsigned PendingSurfaceOperation; | |
71 #endif | |
72 | |
73 GraphicsContext3DPrivate(GraphicsContext3D*, HostWindow*); | 62 GraphicsContext3DPrivate(GraphicsContext3D*, HostWindow*); |
74 bool initialize(); | 63 bool initialize(); |
75 void createGraphicsSurface(); | |
76 bool prepareBuffer() const; | 64 bool prepareBuffer() const; |
77 void releaseResources(); | 65 void releaseResources(); |
78 | 66 #if USE(GRAPHICS_SURFACE) |
| 67 bool makeSharedContextCurrent() const; |
| 68 #endif |
79 GraphicsContext3D* m_context; | 69 GraphicsContext3D* m_context; |
80 HostWindow* m_hostWindow; | 70 HostWindow* m_hostWindow; |
81 OwnPtr<GLPlatformContext> m_offScreenContext; | 71 OwnPtr<GLPlatformContext> m_offScreenContext; |
82 OwnPtr<GLPlatformSurface> m_offScreenSurface; | 72 OwnPtr<GLPlatformSurface> m_offScreenSurface; |
83 #if USE(GRAPHICS_SURFACE) | 73 #if USE(GRAPHICS_SURFACE) |
| 74 OwnPtr<GLPlatformContext> m_sharedContext; |
| 75 OwnPtr<GLPlatformSurface> m_sharedSurface; |
84 GraphicsSurfaceToken m_surfaceHandle; | 76 GraphicsSurfaceToken m_surfaceHandle; |
85 RefPtr<GraphicsSurface> m_graphicsSurface; | |
86 RefPtr<GraphicsSurface> m_previousGraphicsSurface; | |
87 PendingSurfaceOperation m_surfaceOperation : 3; | |
88 #endif | 77 #endif |
89 OwnPtr<GraphicsContext3D::ContextLostCallback> m_contextLostCallback; | 78 OwnPtr<GraphicsContext3D::ContextLostCallback> m_contextLostCallback; |
90 ListHashSet<GC3Denum> m_syntheticErrors; | 79 ListHashSet<GC3Denum> m_syntheticErrors; |
91 IntSize m_size; | 80 IntSize m_size; |
92 IntRect m_targetRect; | |
93 }; | 81 }; |
94 | 82 |
95 } // namespace WebCore | 83 } // namespace WebCore |
96 | 84 |
97 #endif | 85 #endif |
98 | 86 |
99 #endif | 87 #endif |
| 88 |
OLD | NEW |