OLD | NEW |
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 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "gpu/command_buffer/client/gles2_implementation.h" | 9 #include "gpu/command_buffer/client/gles2_implementation.h" |
10 #include "ppapi/c/ppp_graphics_3d.h" | 10 #include "ppapi/c/ppp_graphics_3d.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 bool PPB_Graphics3D_Impl::BindToInstance(bool bind) { | 134 bool PPB_Graphics3D_Impl::BindToInstance(bool bind) { |
135 bound_to_instance_ = bind; | 135 bound_to_instance_ = bind; |
136 return true; | 136 return true; |
137 } | 137 } |
138 | 138 |
139 unsigned int PPB_Graphics3D_Impl::GetBackingTextureId() { | 139 unsigned int PPB_Graphics3D_Impl::GetBackingTextureId() { |
140 return platform_context_->GetBackingTextureId(); | 140 return platform_context_->GetBackingTextureId(); |
141 } | 141 } |
142 | 142 |
| 143 bool PPB_Graphics3D_Impl::IsOpaque() { |
| 144 return platform_context_->IsOpaque(); |
| 145 } |
| 146 |
143 void PPB_Graphics3D_Impl::ViewWillInitiatePaint() { | 147 void PPB_Graphics3D_Impl::ViewWillInitiatePaint() { |
144 } | 148 } |
145 | 149 |
146 void PPB_Graphics3D_Impl::ViewInitiatedPaint() { | 150 void PPB_Graphics3D_Impl::ViewInitiatedPaint() { |
147 commit_pending_ = false; | 151 commit_pending_ = false; |
148 | 152 |
149 if (HasPendingSwap()) | 153 if (HasPendingSwap()) |
150 SwapBuffersACK(PP_OK); | 154 SwapBuffersACK(PP_OK); |
151 } | 155 } |
152 | 156 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 const PPP_Graphics3D* ppp_graphics_3d = | 256 const PPP_Graphics3D* ppp_graphics_3d = |
253 static_cast<const PPP_Graphics3D*>( | 257 static_cast<const PPP_Graphics3D*>( |
254 instance->module()->GetPluginInterface( | 258 instance->module()->GetPluginInterface( |
255 PPP_GRAPHICS_3D_INTERFACE)); | 259 PPP_GRAPHICS_3D_INTERFACE)); |
256 if (ppp_graphics_3d) | 260 if (ppp_graphics_3d) |
257 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); | 261 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); |
258 } | 262 } |
259 | 263 |
260 } // namespace ppapi | 264 } // namespace ppapi |
261 } // namespace webkit | 265 } // namespace webkit |
OLD | NEW |