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

Unified Diff: content/browser/compositor/surface_utils.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/compositor/surface_utils.cc
diff --git a/content/browser/compositor/surface_utils.cc b/content/browser/compositor/surface_utils.cc
index f741a4c10eeed7c624c8b733bbda897398c86854..673a9d39f07b82f2c931a9a3629e0a8770afe0f2 100644
--- a/content/browser/compositor/surface_utils.cc
+++ b/content/browser/compositor/surface_utils.cc
@@ -33,10 +33,7 @@ void CopyFromCompositingSurfaceFinished(
const content::ReadbackRequestCallback& callback,
std::unique_ptr<cc::SingleReleaseCallback> release_callback,
std::unique_ptr<SkBitmap> bitmap,
- std::unique_ptr<SkAutoLockPixels> bitmap_pixels_lock,
bool result) {
- bitmap_pixels_lock.reset();
-
gpu::SyncToken sync_token;
if (result) {
display_compositor::GLHelper* gl_helper =
@@ -88,8 +85,6 @@ void PrepareTextureCopyOutputResult(
if (!gl_helper)
return;
- std::unique_ptr<SkAutoLockPixels> bitmap_pixels_lock(
- new SkAutoLockPixels(*bitmap));
uint8_t* pixels = static_cast<uint8_t*>(bitmap->getPixels());
cc::TextureMailbox texture_mailbox;
@@ -103,8 +98,7 @@ void PrepareTextureCopyOutputResult(
texture_mailbox.mailbox(), texture_mailbox.sync_token(), result->size(),
gfx::Rect(result->size()), dst_size_in_pixel, pixels, color_type,
base::Bind(&CopyFromCompositingSurfaceFinished, callback,
- base::Passed(&release_callback), base::Passed(&bitmap),
- base::Passed(&bitmap_pixels_lock)),
+ base::Passed(&release_callback), base::Passed(&bitmap)),
display_compositor::GLHelper::SCALER_QUALITY_GOOD);
#endif
}
« no previous file with comments | « components/wallpaper/wallpaper_resizer_unittest.cc ('k') | content/browser/devtools/devtools_frame_trace_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698