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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 600953003: Cache cc::SharedBitmaps used by PepperGraphics2DHost to upload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/pepper_graphics_2d_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 98ca698ed56415c5ab34ced2dbebc7737345efd6..bab990eb1cee219c64116045c5e432450840b03c 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -1701,6 +1701,12 @@ void PepperPluginInstanceImpl::SendDidChangeView() {
UpdateLayerTransform();
+ if (bound_graphics_2d_platform_ &&
+ (!view_data_.is_page_visible ||
+ PP_ToGfxRect(view_data_.clip_rect).IsEmpty())) {
+ bound_graphics_2d_platform_->ClearCache();
+ }
+
// It's possible that Delete() has been called but the renderer hasn't
// released its reference to this object yet.
if (instance_interface_) {
« no previous file with comments | « content/renderer/pepper/pepper_graphics_2d_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698