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

Unified Diff: content/browser/devtools/protocol/page_handler.cc

Issue 2702093002: Consistent CopyFromSurface() API, consolidated to RWHV (Closed)
Patch Set: REBASE Created 3 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/devtools/protocol/page_handler.cc
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc
index 12d723b41cd5d21b1880c0552a06c1e918ccb5e2..c31a27ecd24d5e9ce7fe1173af498aea53808243 100644
--- a/content/browser/devtools/protocol/page_handler.cc
+++ b/content/browser/devtools/protocol/page_handler.cc
@@ -470,6 +470,8 @@ void PageHandler::InnerSwapCompositorFrame() {
RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
host_->GetView());
// TODO(vkuzkokov): do not use previous frame metadata.
+ // TODO(miu): RWHV to provide an API to provide actual rendering size.
+ // http://crbug.com/73362
cc::CompositorFrameMetadata& metadata = last_compositor_frame_metadata_;
gfx::SizeF viewport_size_dip = gfx::ScaleSize(
@@ -499,9 +501,8 @@ void PageHandler::InnerSwapCompositorFrame() {
gfx::ScaleSize(viewport_size_dip, scale)));
if (snapshot_size_dip.width() > 0 && snapshot_size_dip.height() > 0) {
- gfx::Rect viewport_bounds_dip(gfx::ToRoundedSize(viewport_size_dip));
- view->CopyFromCompositingSurface(
- viewport_bounds_dip, snapshot_size_dip,
+ view->CopyFromSurface(
+ gfx::Rect(), snapshot_size_dip,
base::Bind(&PageHandler::ScreencastFrameCaptured,
weak_factory_.GetWeakPtr(),
base::Passed(last_compositor_frame_metadata_.Clone())),
« no previous file with comments | « content/browser/devtools/protocol/color_picker.cc ('k') | content/browser/frame_host/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698