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

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: upload error 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 8529331bf3101307bfabfdfd606f9e5156d3f35e..425bf2310ec4887b2bd81fef396fdd4fce1cb1e1 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -748,6 +748,22 @@ void RenderWidgetHostImpl::CopyFromBackingStore(
callback.Run(result, output.GetBitmap());
}
+bool RenderWidgetHostImpl::CanCopyFromBackingStore() {
+ if (view_)
+ view_->IsSurfaceAvailableForCopy();
no sievers 2014/02/21 02:01:37 return view_->IsSurfaceAvailableForCopy();
powei 2014/02/21 02:27:22 Done. (oops)
+ return false;
+}
+
+void RenderWidgetHostImpl::LockForCopyFromBackingStore() {
+ if (view_)
+ view_->LockSurfaceForCopy();
+}
+
+void RenderWidgetHostImpl::UnlockForCopyFromBackingStore() {
+ if (view_)
+ view_->UnlockSurfaceForCopy();
+}
+
#if defined(TOOLKIT_GTK)
bool RenderWidgetHostImpl::CopyFromBackingStoreToGtkWindow(
const gfx::Rect& dest_rect, GdkWindow* target) {

Powered by Google App Engine
This is Rietveld 408576698