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

Unified Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 192373004: use SkColorType instead of (deprecated) SkBitmap::Config for copyTo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « no previous file | cc/layers/nine_patch_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl.cc
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index 9c544f34c8800f2062b847d7b91cc2b0298e3dbd..b53e8d8bfc452078c4bc5b7105e9106280fdaca0 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -170,13 +170,14 @@ void HeadsUpDisplayLayerImpl::UpdateHudTexture(
}
TRACE_EVENT0("cc", "UploadHudTexture");
- const SkBitmap* bitmap = &hud_canvas_->getDevice()->accessBitmap(false);
- SkAutoLockPixels locker(*bitmap);
+ SkImageInfo info;
+ size_t rowBytes;
+ const void* pixels = hud_canvas_->peekPixels(&info, &rowBytes);
gfx::Rect content_rect(content_bounds());
- DCHECK(bitmap->config() == SkBitmap::kARGB_8888_Config);
+ DCHECK(info.colorType() == kPMColor_SkColorType);
resource_provider->SetPixels(hud_resource_->id(),
- static_cast<const uint8_t*>(bitmap->getPixels()),
+ static_cast<const uint8_t*>(pixels),
content_rect,
content_rect,
gfx::Vector2d());
« no previous file with comments | « no previous file | cc/layers/nine_patch_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698