diff options
-rw-r--r-- | content/renderer/pepper/pepper_graphics_2d_host.cc | 9 | ||||
-rw-r--r-- | content/renderer/pepper/pepper_graphics_2d_host.h | 1 | ||||
-rw-r--r-- | content/renderer/pepper/pepper_plugin_instance_impl.cc | 7 | ||||
-rw-r--r-- | content/renderer/pepper/pepper_plugin_instance_impl.h | 7 | ||||
-rw-r--r-- | content/renderer/pepper/ppb_graphics_3d_impl.cc | 3 | ||||
-rw-r--r-- | content/renderer/pepper/ppb_graphics_3d_impl.h | 1 | ||||
-rw-r--r-- | content/renderer/render_view_impl.cc | 15 | ||||
-rw-r--r-- | content/renderer/render_view_impl.h | 1 | ||||
-rw-r--r-- | content/renderer/render_widget.cc | 5 | ||||
-rw-r--r-- | content/renderer/render_widget.h | 12 | ||||
-rw-r--r-- | content/renderer/render_widget_fullscreen_pepper.cc | 5 | ||||
-rw-r--r-- | content/renderer/render_widget_fullscreen_pepper.h | 1 |
12 files changed, 13 insertions, 54 deletions
diff --git a/content/renderer/pepper/pepper_graphics_2d_host.cc b/content/renderer/pepper/pepper_graphics_2d_host.cc index 8fb9841..baa2e95 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.cc +++ b/content/renderer/pepper/pepper_graphics_2d_host.cc @@ -388,9 +388,6 @@ void PepperGraphics2DHost::Paint(WebKit::WebCanvas* canvas, canvas->drawBitmap(image, pixel_origin.x(), pixel_origin.y(), &paint); } -void PepperGraphics2DHost::ViewWillInitiatePaint() { -} - void PepperGraphics2DHost::ViewInitiatedPaint() { } @@ -621,9 +618,9 @@ int32_t PepperGraphics2DHost::Flush(PP_Resource* old_image_data) { // For correctness with accelerated compositing, we must issue an invalidate // on the full op_rect even if it is partially or completely off-screen. // However, if we issue an invalidate for a clipped-out region, WebKit will - // do nothing and we won't get any ViewWillInitiatePaint/ViewFlushedPaint - // calls, leaving our callback stranded. So we still need to check whether - // the repainted area is visible to determine how to deal with the callback. + // do nothing and we won't get any ViewFlushedPaint calls, leaving our + // callback stranded. So we still need to check whether the repainted area + // is visible to determine how to deal with the callback. if (bound_instance_ && !op_rect.IsEmpty()) { gfx::Point scroll_delta(operation.scroll_dx, operation.scroll_dy); if (!ConvertToLogicalPixels(scale_, diff --git a/content/renderer/pepper/pepper_graphics_2d_host.h b/content/renderer/pepper/pepper_graphics_2d_host.h index 7179398..481f1f6 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.h +++ b/content/renderer/pepper/pepper_graphics_2d_host.h @@ -69,7 +69,6 @@ class CONTENT_EXPORT PepperGraphics2DHost // Notifications about the view's progress painting. See PluginInstance. // These messages are used to send Flush callbacks to the plugin. - void ViewWillInitiatePaint(); void ViewInitiatedPaint(); void ViewFlushedPaint(); diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc index ea6ecdd0..0974e5f 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc @@ -1149,13 +1149,6 @@ void PepperPluginInstanceImpl::PageVisibilityChanged(bool is_visible) { SendDidChangeView(); } -void PepperPluginInstanceImpl::ViewWillInitiatePaint() { - if (bound_graphics_2d_platform_) - bound_graphics_2d_platform_->ViewWillInitiatePaint(); - else if (bound_graphics_3d_.get()) - bound_graphics_3d_->ViewWillInitiatePaint(); -} - void PepperPluginInstanceImpl::ViewInitiatedPaint() { if (bound_graphics_2d_platform_) bound_graphics_2d_platform_->ViewInitiatedPaint(); diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h index 42d7d71..b0b9b21 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.h +++ b/content/renderer/pepper/pepper_plugin_instance_impl.h @@ -208,10 +208,9 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // Notification about page visibility. The default is "visible". void PageVisibilityChanged(bool is_visible); - // Notifications that the view is about to paint, has started painting, and - // has flushed the painted content to the screen. These messages are used to - // send Flush callbacks to the plugin for DeviceContext2D/3D. - void ViewWillInitiatePaint(); + // Notifications that the view has started painting, and has flushed the + // painted content to the screen. These messages are used to send Flush + // callbacks to the plugin for DeviceContext2D/3D. void ViewInitiatedPaint(); void ViewFlushedPaint(); diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc index dc7291e..252e013 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.cc +++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc @@ -172,9 +172,6 @@ bool PPB_Graphics3D_Impl::IsOpaque() { return platform_context_->IsOpaque(); } -void PPB_Graphics3D_Impl::ViewWillInitiatePaint() { -} - void PPB_Graphics3D_Impl::ViewInitiatedPaint() { commit_pending_ = false; diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.h b/content/renderer/pepper/ppb_graphics_3d_impl.h index 2ddeb86..d4d4c2b 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.h +++ b/content/renderer/pepper/ppb_graphics_3d_impl.h @@ -45,7 +45,6 @@ class PPB_Graphics3D_Impl : public ppapi::PPB_Graphics3D_Shared { // Notifications about the view's progress painting. See PluginInstance. // These messages are used to send Flush callbacks to the plugin. - void ViewWillInitiatePaint(); void ViewInitiatedPaint(); void ViewFlushedPaint(); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index bbed24d..18ca741 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -5464,17 +5464,6 @@ void RenderViewImpl::OnResize(const ViewMsg_Resize_Params& params) { RenderWidget::OnResize(params); } -void RenderViewImpl::WillInitiatePaint() { -#if defined(ENABLE_PLUGINS) - // Notify all of our instances that we started painting. This is used for - // internal bookkeeping only, so we know that the set can not change under - // us. - for (PepperPluginSet::iterator i = active_pepper_instances_.begin(); - i != active_pepper_instances_.end(); ++i) - (*i)->ViewWillInitiatePaint(); -#endif -} - void RenderViewImpl::DidInitiatePaint() { #if defined(ENABLE_PLUGINS) // Notify all instances that we painted. The same caveats apply as for @@ -5510,8 +5499,8 @@ void RenderViewImpl::DidFlushPaint() { // What about the case where a new one is created in a callback at a new // address and we don't issue the callback? We're still OK since this // callback is used for flush callbacks and we could not have possibly - // started a new paint (ViewWillInitiatePaint) for the new plugin while - // processing a previous paint for an existing one. + // started a new paint for the new plugin while processing a previous paint + // for an existing one. if (active_pepper_instances_.find(*i) != active_pepper_instances_.end()) (*i)->ViewFlushedPaint(); } diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 1dc7e85..d2057fe 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -721,7 +721,6 @@ class CONTENT_EXPORT RenderViewImpl // RenderWidget overrides: virtual void Close() OVERRIDE; virtual void OnResize(const ViewMsg_Resize_Params& params) OVERRIDE; - virtual void WillInitiatePaint() OVERRIDE; virtual void DidInitiatePaint() OVERRIDE; virtual void DidFlushPaint() OVERRIDE; virtual PepperPluginInstanceImpl* GetBitmapForOptimizedPluginPaint( diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 92201b2..e905ab6 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -1500,9 +1500,6 @@ void RenderWidget::DoDeferredUpdate() { gfx::Rect scroll_damage = update.GetScrollDamage(); gfx::Rect bounds = gfx::UnionRects(update.GetPaintBounds(), scroll_damage); - // Notify derived classes that we're about to initiate a paint. - WillInitiatePaint(); - // A plugin may be able to do an optimized paint. First check this, in which // case we can skip all of the bitmap generation and regular paint code. // This optimization allows PPAPI plugins that declare themselves on top of @@ -1835,8 +1832,6 @@ void RenderWidget::willBeginCompositorFrame() { UpdateTextInputState(false, true); #endif UpdateSelectionBounds(); - - WillInitiatePaint(); } void RenderWidget::didBecomeReadyForAdditionalInput() { diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index dbab733..8341b0a 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h @@ -378,13 +378,11 @@ class CONTENT_EXPORT RenderWidget virtual void SetDeviceScaleFactor(float device_scale_factor); // Override points to notify derived classes that a paint has happened. - // WillInitiatePaint happens when we're about to generate a new bitmap and - // send it to the browser. DidInitiatePaint happens when that has completed, - // and subsequent rendering won't affect the painted content. DidFlushPaint - // happens once we've received the ACK that the screen has been updated. - // For a given paint operation, these overrides will always be called in the - // order WillInitiatePaint, DidInitiatePaint, DidFlushPaint. - virtual void WillInitiatePaint() {} + // DidInitiatePaint happens when that has completed, and subsequent rendering + // won't affect the painted content. DidFlushPaint happens once we've received + // the ACK that the screen has been updated. For a given paint operation, + // these overrides will always be called in the order DidInitiatePaint, + // DidFlushPaint. virtual void DidInitiatePaint() {} virtual void DidFlushPaint() {} diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc index 40206b2..30f2ed9 100644 --- a/content/renderer/render_widget_fullscreen_pepper.cc +++ b/content/renderer/render_widget_fullscreen_pepper.cc @@ -437,11 +437,6 @@ bool RenderWidgetFullscreenPepper::OnMessageReceived(const IPC::Message& msg) { return RenderWidgetFullscreen::OnMessageReceived(msg); } -void RenderWidgetFullscreenPepper::WillInitiatePaint() { - if (plugin_) - plugin_->ViewWillInitiatePaint(); -} - void RenderWidgetFullscreenPepper::DidInitiatePaint() { if (plugin_) plugin_->ViewInitiatedPaint(); diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h index 29980e8..16b88b9 100644 --- a/content/renderer/render_widget_fullscreen_pepper.h +++ b/content/renderer/render_widget_fullscreen_pepper.h @@ -58,7 +58,6 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, virtual ~RenderWidgetFullscreenPepper(); // RenderWidget API. - virtual void WillInitiatePaint() OVERRIDE; virtual void DidInitiatePaint() OVERRIDE; virtual void DidFlushPaint() OVERRIDE; virtual void Close() OVERRIDE; |