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

Side by Side Diff: Source/platform/graphics/gpu/SharedGraphicsContext3D.cpp

Issue 127163003: Completely removed the Extensions3D class (Take 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 months 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
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | Source/web/WebMediaPlayerClientImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 10 matching lines...) Expand all
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 26
27 #include "config.h" 27 #include "config.h"
28 28
29 #include "platform/graphics/gpu/SharedGraphicsContext3D.h" 29 #include "platform/graphics/gpu/SharedGraphicsContext3D.h"
30 30
31 #include "platform/graphics/Extensions3D.h"
32 #include "public/platform/Platform.h" 31 #include "public/platform/Platform.h"
33 #include "public/platform/WebGraphicsContext3D.h" 32 #include "public/platform/WebGraphicsContext3D.h"
34 #include "public/platform/WebGraphicsContext3DProvider.h" 33 #include "public/platform/WebGraphicsContext3DProvider.h"
35 #include "wtf/MainThread.h" 34 #include "wtf/MainThread.h"
36 35
37 namespace WebCore { 36 namespace WebCore {
38 37
39 class SharedGraphicsContext3DImpl { 38 class SharedGraphicsContext3DImpl {
40 public: 39 public:
41 SharedGraphicsContext3DImpl() : m_context(0) { } 40 SharedGraphicsContext3DImpl() : m_context(0) { }
(...skipping 18 matching lines...) Expand all
60 if (webContext != oldWebContext || grContext != oldGrContext) 59 if (webContext != oldWebContext || grContext != oldGrContext)
61 m_context.clear(); 60 m_context.clear();
62 61
63 if (!m_context) { 62 if (!m_context) {
64 m_context = GraphicsContext3D::createGraphicsContextFromProvider (provider.release()); 63 m_context = GraphicsContext3D::createGraphicsContextFromProvider (provider.release());
65 wasCreated = true; 64 wasCreated = true;
66 } 65 }
67 } 66 }
68 67
69 if (m_context && wasCreated) 68 if (m_context && wasCreated)
70 m_context->extensions()->pushGroupMarkerEXT("SharedGraphicsContext") ; 69 m_context->webContext()->pushGroupMarkerEXT("SharedGraphicsContext") ;
71 return m_context; 70 return m_context;
72 } 71 }
73 72
74 private: 73 private:
75 RefPtr<GraphicsContext3D> m_context; 74 RefPtr<GraphicsContext3D> m_context;
76 }; 75 };
77 76
78 PassRefPtr<GraphicsContext3D> SharedGraphicsContext3D::get() 77 PassRefPtr<GraphicsContext3D> SharedGraphicsContext3D::get()
79 { 78 {
80 DEFINE_STATIC_LOCAL(SharedGraphicsContext3DImpl, impl, ()); 79 DEFINE_STATIC_LOCAL(SharedGraphicsContext3DImpl, impl, ());
81 return impl.getOrCreateContext(); 80 return impl.getOrCreateContext();
82 } 81 }
83 82
84 } // namespace WebCore 83 } // namespace WebCore
85 84
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | Source/web/WebMediaPlayerClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698