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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 5944001: Make Graphics3D::SwapBuffers take a completion callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update to Alok's Context3D/Surface3D changes Created 9 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 | « ppapi/cpp/dev/surface_3d_dev.cc ('k') | webkit/plugins/ppapi/ppb_surface_3d_impl.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 has_content_area_focus_ = has_focus; 624 has_content_area_focus_ = has_focus;
625 if (PluginHasFocus() != old_plugin_focus) { 625 if (PluginHasFocus() != old_plugin_focus) {
626 instance_interface_->DidChangeFocus(pp_instance(), 626 instance_interface_->DidChangeFocus(pp_instance(),
627 BoolToPPBool(PluginHasFocus())); 627 BoolToPPBool(PluginHasFocus()));
628 } 628 }
629 } 629 }
630 630
631 void PluginInstance::ViewInitiatedPaint() { 631 void PluginInstance::ViewInitiatedPaint() {
632 if (bound_graphics_2d()) 632 if (bound_graphics_2d())
633 bound_graphics_2d()->ViewInitiatedPaint(); 633 bound_graphics_2d()->ViewInitiatedPaint();
634 if (bound_graphics_3d())
635 bound_graphics_3d()->ViewInitiatedPaint();
634 } 636 }
635 637
636 void PluginInstance::ViewFlushedPaint() { 638 void PluginInstance::ViewFlushedPaint() {
637 if (bound_graphics_2d()) 639 if (bound_graphics_2d())
638 bound_graphics_2d()->ViewFlushedPaint(); 640 bound_graphics_2d()->ViewFlushedPaint();
641 if (bound_graphics_3d())
642 bound_graphics_3d()->ViewFlushedPaint();
639 } 643 }
640 644
641 bool PluginInstance::GetBitmapForOptimizedPluginPaint( 645 bool PluginInstance::GetBitmapForOptimizedPluginPaint(
642 const gfx::Rect& paint_bounds, 646 const gfx::Rect& paint_bounds,
643 TransportDIB** dib, 647 TransportDIB** dib,
644 gfx::Rect* location, 648 gfx::Rect* location,
645 gfx::Rect* clip) { 649 gfx::Rect* clip) {
646 if (!always_on_top_) 650 if (!always_on_top_)
647 return false; 651 return false;
648 if (!bound_graphics_2d() || !bound_graphics_2d()->is_always_opaque()) 652 if (!bound_graphics_2d() || !bound_graphics_2d()->is_always_opaque())
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 PPB_Surface3D_Impl* PluginInstance::bound_graphics_3d() const { 1173 PPB_Surface3D_Impl* PluginInstance::bound_graphics_3d() const {
1170 if (bound_graphics_.get() == NULL) 1174 if (bound_graphics_.get() == NULL)
1171 return NULL; 1175 return NULL;
1172 1176
1173 return bound_graphics_->Cast<PPB_Surface3D_Impl>(); 1177 return bound_graphics_->Cast<PPB_Surface3D_Impl>();
1174 } 1178 }
1175 1179
1176 } // namespace ppapi 1180 } // namespace ppapi
1177 } // namespace webkit 1181 } // namespace webkit
1178 1182
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/surface_3d_dev.cc ('k') | webkit/plugins/ppapi/ppb_surface_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698