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

Side by Side Diff: content/shell/test_runner/pixel_dump.cc

Issue 2823003002: SkBitmap and SkPixelRef no longer need lock/unlock (Closed)
Patch Set: win fix after rebase Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/test_runner/pixel_dump.h" 5 #include "content/shell/test_runner/pixel_dump.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 blink::Platform::Current()->Clipboard()->SequenceNumber( 197 blink::Platform::Current()->Clipboard()->SequenceNumber(
198 blink::WebClipboard::Buffer())) { 198 blink::WebClipboard::Buffer())) {
199 SkBitmap emptyBitmap; 199 SkBitmap emptyBitmap;
200 callback.Run(emptyBitmap); 200 callback.Run(emptyBitmap);
201 return; 201 return;
202 } 202 }
203 203
204 blink::WebImage image = static_cast<blink::WebMockClipboard*>( 204 blink::WebImage image = static_cast<blink::WebMockClipboard*>(
205 blink::Platform::Current()->Clipboard()) 205 blink::Platform::Current()->Clipboard())
206 ->ReadRawImage(blink::WebClipboard::Buffer()); 206 ->ReadRawImage(blink::WebClipboard::Buffer());
207 const SkBitmap& bitmap = image.GetSkBitmap(); 207 callback.Run(image.GetSkBitmap());
208 SkAutoLockPixels autoLock(bitmap);
209 callback.Run(bitmap);
210 } 208 }
211 209
212 } // namespace test_runner 210 } // namespace test_runner
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | content/shell/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698