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

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

Issue 727073002: Plugin Power Saver: Force SW rendering for peripheral plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0192-plugin-power-saver-implement-basic-stop-frame-heuristic
Patch Set: Created 6 years, 1 month 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_plugin_instance_throttler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/ppb_graphics_3d_impl.cc
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc
index 12d1db923a1440f5bdacea39aa76765ae9934f37..e93f08e0e4c8be0d358042cddb46dcf49f0220c0 100644
--- a/content/renderer/pepper/ppb_graphics_3d_impl.cc
+++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc
@@ -14,6 +14,7 @@
#include "content/public/common/web_preferences.h"
#include "content/renderer/pepper/host_globals.h"
#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
+#include "content/renderer/pepper/pepper_plugin_instance_throttler.h"
#include "content/renderer/pepper/plugin_module.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
@@ -242,6 +243,11 @@ bool PPB_Graphics3D_Impl::InitRaw(
if (!prefs.pepper_3d_enabled)
return false;
+ // Force SW rendering for keyframe extraction to avoid pixel reads from VRAM.
+ PepperPluginInstanceThrottler* throttler = plugin_instance->throttler();
+ if (throttler && throttler->needs_representative_keyframe())
+ return false;
+
RenderThreadImpl* render_thread = RenderThreadImpl::current();
if (!render_thread)
return false;
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_throttler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698