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

Unified Diff: content/browser/devtools/protocol/color_picker.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
« no previous file with comments | « content/browser/devtools/protocol/color_picker.h ('k') | content/browser/devtools/protocol/page_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/color_picker.cc
diff --git a/content/browser/devtools/protocol/color_picker.cc b/content/browser/devtools/protocol/color_picker.cc
index ac04aa4ac5378c56ac4d18874325df7f90e52b95..722df3358a6a27aefc045d62cb1c4350616de24e 100644
--- a/content/browser/devtools/protocol/color_picker.cc
+++ b/content/browser/devtools/protocol/color_picker.cc
@@ -83,11 +83,14 @@ void ColorPicker::UpdateFrame() {
if (!view)
return;
- gfx::Size size = view->GetViewBounds().size();
- view->CopyFromCompositingSurface(
- gfx::Rect(size), size,
- base::Bind(&ColorPicker::FrameUpdated,
- weak_factory_.GetWeakPtr()),
+ // TODO(miu): This is the wrong size. It's the size of the view on-screen, and
+ // not the rendering size of the view. The latter is what is wanted here, so
+ // that the resulting bitmap's pixel coordinates line-up with the
+ // blink::WebMouseEvent coordinates. http://crbug.com/73362
+ gfx::Size should_be_rendering_size = view->GetViewBounds().size();
+ view->CopyFromSurface(
+ gfx::Rect(), should_be_rendering_size,
+ base::Bind(&ColorPicker::FrameUpdated, weak_factory_.GetWeakPtr()),
kN32_SkColorType);
}
« no previous file with comments | « content/browser/devtools/protocol/color_picker.h ('k') | content/browser/devtools/protocol/page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698