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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 274163004: Remove browser-side tracking of accelerated compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 2e89069f8921a6a50058307ebd33f37c9f5ea571..3e01d49dd584ca3b4cc8f9330d55aba410301dfa 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1210,6 +1210,8 @@ void RenderWidgetHostViewMac::CopyFromCompositingSurface(
ignore_result(scoped_callback_runner.Release());
callback.Run(true, target_bitmap);
+ } else {
+ callback.Run(false, SkBitmap());
danakj 2014/05/12 17:37:58 should we NOTREACHED? or is this a valid case
piman 2014/05/13 20:25:40 Won't we get here if we CopyFromCompositingSurface
danakj 2014/05/13 21:23:43 Only if you didn't check IsSurfaceAvailableForCopy
}
}
@@ -1218,8 +1220,7 @@ void RenderWidgetHostViewMac::CopyFromCompositingSurfaceToVideoFrame(
const scoped_refptr<media::VideoFrame>& target,
const base::Callback<void(bool)>& callback) {
base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false));
- if (!render_widget_host_->is_accelerated_compositing_active() ||
- !compositing_iosurface_ ||
+ if (!compositing_iosurface_ ||
!compositing_iosurface_->HasIOSurface())
return;
@@ -1246,7 +1247,6 @@ void RenderWidgetHostViewMac::CopyFromCompositingSurfaceToVideoFrame(
bool RenderWidgetHostViewMac::CanCopyToVideoFrame() const {
return (!software_frame_manager_->HasCurrentFrame() &&
- render_widget_host_->is_accelerated_compositing_active() &&
compositing_iosurface_ &&
compositing_iosurface_->HasIOSurface());
}
@@ -1817,9 +1817,6 @@ void RenderWidgetHostViewMac::OnSwapCompositorFrame(
NotificationService::NoDetails());
}
-void RenderWidgetHostViewMac::OnAcceleratedCompositingStateChange() {
-}
-
void RenderWidgetHostViewMac::AcceleratedSurfaceInitialized(int host_id,
int route_id) {
}

Powered by Google App Engine
This is Rietveld 408576698