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

Side by Side Diff: content/renderer/pepper/ppb_graphics_3d_impl.cc

Issue 195623004: Merge 254840 "ppapi: Send sync point whenever the pepper texture..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 6 years, 9 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 | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" 5 #include "content/renderer/pepper/ppb_graphics_3d_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return platform_context_->GetGpuControl(); 190 return platform_context_->GetGpuControl();
191 } 191 }
192 192
193 int32 PPB_Graphics3D_Impl::DoSwapBuffers() { 193 int32 PPB_Graphics3D_Impl::DoSwapBuffers() {
194 // We do not have a GLES2 implementation when using an OOP proxy. 194 // We do not have a GLES2 implementation when using an OOP proxy.
195 // The plugin-side proxy is responsible for adding the SwapBuffers command 195 // The plugin-side proxy is responsible for adding the SwapBuffers command
196 // to the command buffer in that case. 196 // to the command buffer in that case.
197 if (gles2_impl()) 197 if (gles2_impl())
198 gles2_impl()->SwapBuffers(); 198 gles2_impl()->SwapBuffers();
199 199
200 // Since the backing texture has been updated, a new sync point should be
201 // inserted.
202 platform_context_->InsertSyncPointForBackingMailbox();
203
200 if (bound_to_instance_) { 204 if (bound_to_instance_) {
201 // If we are bound to the instance, we need to ask the compositor 205 // If we are bound to the instance, we need to ask the compositor
202 // to commit our backing texture so that the graphics appears on the page. 206 // to commit our backing texture so that the graphics appears on the page.
203 // When the backing texture will be committed we get notified via 207 // When the backing texture will be committed we get notified via
204 // ViewFlushedPaint(). 208 // ViewFlushedPaint().
205 // 209 //
206 // Don't need to check for NULL from GetPluginInstance since when we're 210 // Don't need to check for NULL from GetPluginInstance since when we're
207 // bound, we know our instance is valid. 211 // bound, we know our instance is valid.
208 HostGlobals::Get()->GetInstance(pp_instance())->CommitBackingTexture(); 212 HostGlobals::Get()->GetInstance(pp_instance())->CommitBackingTexture();
209 commit_pending_ = true; 213 commit_pending_ = true;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 PPP_GRAPHICS_3D_INTERFACE)); 340 PPP_GRAPHICS_3D_INTERFACE));
337 // We have to check *again* that the instance exists, because it could have 341 // We have to check *again* that the instance exists, because it could have
338 // been deleted during GetPluginInterface(). Even the PluginModule could be 342 // been deleted during GetPluginInterface(). Even the PluginModule could be
339 // deleted, but in that case, the instance should also be gone, so the 343 // deleted, but in that case, the instance should also be gone, so the
340 // GetInstance check covers both cases. 344 // GetInstance check covers both cases.
341 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance)) 345 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance))
342 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); 346 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance);
343 } 347 }
344 348
345 } // namespace content 349 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698