Commit f51a712d authored by mukai@chromium.org's avatar mukai@chromium.org

Stops using ConvertRectToPixel in snapshot_aura.

The CopyOutputRequest's area is now in layer's scale factor, not
in pixel.

R=danakj@chromium.org, piman@chromium.org
BUG=381578
TEST=manually, snapshot_unittests succeeds

Review URL: https://codereview.chromium.org/321323003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276612 0039d316-1c4b-4281-b951-d872f2087c98
parent 3d5b93cb
......@@ -36,7 +36,7 @@ static void MakeAsyncCopyRequest(
const cc::CopyOutputRequest::CopyOutputRequestCallback& callback) {
scoped_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateBitmapRequest(callback);
request->set_area(ui::ConvertRectToPixel(window->layer(), source_rect));
request->set_area(source_rect);
window->layer()->RequestCopyOfOutput(request.Pass());
}
......
......@@ -126,12 +126,14 @@ class SnapshotAuraTest : public testing::Test {
gfx::Image GrabSnapshotForTestWindow() {
gfx::Rect source_rect(test_window_->bounds().size());
aura::Window::ConvertRectToTarget(
test_window(), root_window(), &source_rect);
scoped_refptr<base::TestSimpleTaskRunner> task_runner(
new base::TestSimpleTaskRunner());
scoped_refptr<SnapshotHolder> holder(new SnapshotHolder);
ui::GrabWindowSnapshotAsync(
test_window(),
root_window(),
source_rect,
task_runner,
base::Bind(&SnapshotHolder::SnapshotCallback, holder));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment