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

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: fix android clang bot try 2 Created 6 years, 9 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 748aa48bb3f9052d0d3c8a4c17a6062dbba9407f..828df2308fcb7ef6e84c19ca9e3e6c84877c5e95 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -742,6 +742,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::LockBackingStore() {
+ if (view_)
+ view_->LockCompositingSurface();
+}
+
+void RenderWidgetHostImpl::UnlockBackingStore() {
+ if (view_)
+ view_->UnlockCompositingSurface();
+}
+#endif
+
#if defined(TOOLKIT_GTK)
bool RenderWidgetHostImpl::CopyFromBackingStoreToGtkWindow(
const gfx::Rect& dest_rect, GdkWindow* target) {

Powered by Google App Engine
This is Rietveld 408576698