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

Unified Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 197883017: SkColorType instead of (deprecated) SkBitmap::Config (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments from #5 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 c6ed5fc67c670a1c25cb528d7fd8fdc866d67e66..888913c95c641910ce3863b8a3aa4c3dd5a8fcfa 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 row_bytes = 0;
+ const void* pixels = hud_canvas_->peekPixels(&info, &row_bytes);
+ DCHECK(pixels);
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