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

Side by Side Diff: webkit/plugins/ppapi/ppb_graphics_3d_impl.h

Issue 10386145: Add the necessary plumbing mechanisms to ensure proper WebGL support inside the <browser> tag, whic… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Shuffle EnterResource back out of the thunk layer Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h" 9 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
10 #include "ppapi/shared_impl/resource.h" 10 #include "ppapi/shared_impl/resource.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 protected: 62 protected:
63 // ppapi::PPB_Graphics3D_Shared overrides. 63 // ppapi::PPB_Graphics3D_Shared overrides.
64 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; 64 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE;
65 virtual int32 DoSwapBuffers() OVERRIDE; 65 virtual int32 DoSwapBuffers() OVERRIDE;
66 66
67 private: 67 private:
68 explicit PPB_Graphics3D_Impl(PP_Instance instance); 68 explicit PPB_Graphics3D_Impl(PP_Instance instance);
69 69
70 bool Init(PP_Resource share_context, 70 bool Init(PPB_Graphics3D_API* share_context,
71 const int32_t* attrib_list); 71 const int32_t* attrib_list);
72 bool InitRaw(PP_Resource share_context, 72 bool InitRaw(PPB_Graphics3D_API* share_context,
73 const int32_t* attrib_list); 73 const int32_t* attrib_list);
74 74
75 // Notifications received from the GPU process. 75 // Notifications received from the GPU process.
76 void OnSwapBuffers(); 76 void OnSwapBuffers();
77 void OnContextLost(); 77 void OnContextLost();
78 void OnConsoleMessage(const std::string& msg, int id); 78 void OnConsoleMessage(const std::string& msg, int id);
79 // Notifications sent to plugin. 79 // Notifications sent to plugin.
80 void SendContextLost(); 80 void SendContextLost();
81 81
82 // True if context is bound to instance. 82 // True if context is bound to instance.
83 bool bound_to_instance_; 83 bool bound_to_instance_;
84 // True when waiting for compositor to commit our backing texture. 84 // True when waiting for compositor to commit our backing texture.
85 bool commit_pending_; 85 bool commit_pending_;
86 // PluginDelegate's 3D Context. Responsible for providing the command buffer. 86 // PluginDelegate's 3D Context. Responsible for providing the command buffer.
87 scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_; 87 scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_;
88 base::WeakPtrFactory<PPB_Graphics3D_Impl> weak_ptr_factory_; 88 base::WeakPtrFactory<PPB_Graphics3D_Impl> weak_ptr_factory_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Impl); 90 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Impl);
91 }; 91 };
92 92
93 } // namespace ppapi 93 } // namespace ppapi
94 } // namespace webkit 94 } // namespace webkit
95 95
96 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ 96 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698