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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 174323003: Expose locks for CopyFromCompositingSurface/CopyFromBackingStore API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 6 years, 10 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index b827c143cf3d8d4ba4161dd1cd5964fdc6b0993e..a0b7e108fb93841409af5bec258dee5e7fe68728 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -748,6 +748,24 @@ void RenderWidgetHostImpl::CopyFromBackingStore(
callback.Run(result, output.GetBitmap());
}
+bool RenderWidgetHostImpl::CanCopyFromBackingStore() {
+ if (view_)
+ return view_->IsSurfaceAvailableForCopy();
+ return false;
+}
+
+#if defined(OS_ANDROID)
+void RenderWidgetHostImpl::LockForCopyFromBackingStore() {
+ if (view_)
+ view_->LockSurfaceForCopy();
+}
+
+void RenderWidgetHostImpl::UnlockForCopyFromBackingStore() {
+ if (view_)
+ view_->UnlockSurfaceForCopy();
+}
+#endif
+
#if defined(TOOLKIT_GTK)
bool RenderWidgetHostImpl::CopyFromBackingStoreToGtkWindow(
const gfx::Rect& dest_rect, GdkWindow* target) {

Powered by Google App Engine
This is Rietveld 408576698