diff options
author | jbauman <jbauman@chromium.org> | 2014-12-10 01:10:07 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-10 09:10:32 +0000 |
commit | 742fa38a82d89519f54e29ce4d2106f700d2e98d (patch) | |
tree | 0de5fd7c7e00f1b18f889dda7ea8db4876029285 | |
parent | 9b73eaff36bbb2f6038d8500e4fbc1838936294c (diff) | |
download | chromium_src-742fa38a82d89519f54e29ce4d2106f700d2e98d.zip chromium_src-742fa38a82d89519f54e29ce4d2106f700d2e98d.tar.gz chromium_src-742fa38a82d89519f54e29ce4d2106f700d2e98d.tar.bz2 |
Remove ViewFlushedPaint
All the uses have been moved to ViewInitiatedPaint.
Review URL: https://codereview.chromium.org/782113002
Cr-Commit-Position: refs/heads/master@{#307662}
11 files changed, 3 insertions, 56 deletions
diff --git a/content/renderer/pepper/pepper_compositor_host.cc b/content/renderer/pepper/pepper_compositor_host.cc index 284d36c..039e7ae 100644 --- a/content/renderer/pepper/pepper_compositor_host.cc +++ b/content/renderer/pepper/pepper_compositor_host.cc @@ -168,8 +168,6 @@ void PepperCompositorHost::ViewInitiatedPaint() { SendCommitLayersReplyIfNecessary(); } -void PepperCompositorHost::ViewFlushedPaint() {} - void PepperCompositorHost::ImageReleased( int32_t id, const scoped_ptr<base::SharedMemory>& shared_memory, diff --git a/content/renderer/pepper/pepper_compositor_host.h b/content/renderer/pepper/pepper_compositor_host.h index d0ecac0..078f87f 100644 --- a/content/renderer/pepper/pepper_compositor_host.h +++ b/content/renderer/pepper/pepper_compositor_host.h @@ -39,7 +39,6 @@ class PepperCompositorHost : public ppapi::host::ResourceHost { const scoped_refptr<cc::Layer> layer() { return layer_; }; void ViewInitiatedPaint(); - void ViewFlushedPaint(); private: ~PepperCompositorHost() override; diff --git a/content/renderer/pepper/pepper_graphics_2d_host.cc b/content/renderer/pepper/pepper_graphics_2d_host.cc index da3e230..c567f9f 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.cc +++ b/content/renderer/pepper/pepper_graphics_2d_host.cc @@ -392,9 +392,6 @@ void PepperGraphics2DHost::ViewInitiatedPaint() { } } -void PepperGraphics2DHost::ViewFlushedPaint() { -} - void PepperGraphics2DHost::SetScale(float scale) { scale_ = scale; } float PepperGraphics2DHost::GetScale() const { return scale_; } diff --git a/content/renderer/pepper/pepper_graphics_2d_host.h b/content/renderer/pepper/pepper_graphics_2d_host.h index 7347a0a..088e385 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.h +++ b/content/renderer/pepper/pepper_graphics_2d_host.h @@ -78,7 +78,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 ViewInitiatedPaint(); - void ViewFlushedPaint(); void SetScale(float scale); float GetScale() const; diff --git a/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc b/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc index b0f7bdf..11af685 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc +++ b/content/renderer/pepper/pepper_graphics_2d_host_unittest.cc @@ -67,7 +67,7 @@ class PepperGraphics2DHostTest : public testing::Test { ppapi::proxy::ResourceMessageCallParams(host_->pp_resource(), 0)); std::vector<ui::LatencyInfo> latency; host_->OnHostMsgFlush(&context, latency); - host_->ViewFlushedPaint(); + host_->ViewInitiatedPaint(); host_->SendOffscreenFlushAck(); } diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc index db0410f..8c2bbb8 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc @@ -1337,17 +1337,6 @@ void PepperPluginInstanceImpl::ViewInitiatedPaint() { bound_compositor_->ViewInitiatedPaint(); } -void PepperPluginInstanceImpl::ViewFlushedPaint() { - // Keep a reference on the stack. See NOTE above. - scoped_refptr<PepperPluginInstanceImpl> ref(this); - if (bound_graphics_2d_platform_) - bound_graphics_2d_platform_->ViewFlushedPaint(); - else if (bound_graphics_3d_.get()) - bound_graphics_3d_->ViewFlushedPaint(); - else if (bound_compositor_) - bound_compositor_->ViewFlushedPaint(); -} - void PepperPluginInstanceImpl::SetSelectedText( const base::string16& selected_text) { selected_text_ = selected_text; diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h index 37e95df0..0a3b000 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.h +++ b/content/renderer/pepper/pepper_plugin_instance_impl.h @@ -232,11 +232,9 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // Notification about page visibility. The default is "visible". void PageVisibilityChanged(bool is_visible); - // 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. + // Notifications that the view has started painting. This message is used to + // send Flush callbacks to the plugin for Graphics2D/3D. void ViewInitiatedPaint(); - void ViewFlushedPaint(); // Tracks all live PluginObjects. void AddPluginObject(PluginObject* plugin_object); diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc index e93f08e..64f2ed4 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.cc +++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc @@ -164,8 +164,6 @@ void PPB_Graphics3D_Impl::ViewInitiatedPaint() { SwapBuffersACK(PP_OK); } -void PPB_Graphics3D_Impl::ViewFlushedPaint() {} - int PPB_Graphics3D_Impl::GetCommandBufferRouteId() { DCHECK(command_buffer_); return command_buffer_->GetRouteID(); diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.h b/content/renderer/pepper/ppb_graphics_3d_impl.h index 5fcd163..7299712 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.h +++ b/content/renderer/pepper/ppb_graphics_3d_impl.h @@ -55,7 +55,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 ViewInitiatedPaint(); - void ViewFlushedPaint(); void GetBackingMailbox(gpu::Mailbox* mailbox, uint32* sync_point) { *mailbox = mailbox_; diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 8cc2168..61f4c88 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -3247,34 +3247,6 @@ void RenderViewImpl::DidInitiatePaint() { } void RenderViewImpl::DidFlushPaint() { -#if defined(ENABLE_PLUGINS) - // Notify all instances that we flushed. This will call into the plugin, and - // we it may ask to close itself as a result. This will, in turn, modify our - // set, possibly invalidating the iterator. So we iterate on a copy that - // won't change out from under us. - PepperPluginSet plugins = active_pepper_instances_; - for (PepperPluginSet::iterator i = plugins.begin(); i != plugins.end(); ++i) { - // The copy above makes sure our iterator is never invalid if some plugins - // are destroyed. But some plugin may decide to close all of its views in - // response to a paint in one of them, so we need to make sure each one is - // still "current" before using it. - // - // It's possible that a plugin was destroyed, but another one was created - // with the same address. In this case, we'll call ViewFlushedPaint on that - // new plugin. But that's OK for this particular case since we're just - // notifying all of our instances that the view flushed, and the new one is - // one of our instances. - // - // 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 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(); - } -#endif - // If the RenderWidget is closing down then early-exit, otherwise we'll crash. // See crbug.com/112921. if (!webview()) diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc index f58304e..363c5f0 100644 --- a/content/renderer/render_widget_fullscreen_pepper.cc +++ b/content/renderer/render_widget_fullscreen_pepper.cc @@ -359,8 +359,6 @@ void RenderWidgetFullscreenPepper::DidInitiatePaint() { } void RenderWidgetFullscreenPepper::DidFlushPaint() { - if (plugin_) - plugin_->ViewFlushedPaint(); } void RenderWidgetFullscreenPepper::Close() { |