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

Unified Diff: cc/output/gl_renderer.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 | « cc/layers/ui_resource_layer_unittest.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 89b1e00554a01a3e2eed1ac300305bae578e7be0..b8f6397ed8fce6509b7bbedd6ebae31c3ce3027a 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -1739,10 +1739,8 @@ void GLRenderer::DrawPictureQuad(const DrawingFrame* frame,
const PictureDrawQuad* quad) {
if (on_demand_tile_raster_bitmap_.width() != quad->texture_size.width() ||
on_demand_tile_raster_bitmap_.height() != quad->texture_size.height()) {
- on_demand_tile_raster_bitmap_.setConfig(SkBitmap::kARGB_8888_Config,
- quad->texture_size.width(),
- quad->texture_size.height());
- on_demand_tile_raster_bitmap_.allocPixels();
+ on_demand_tile_raster_bitmap_.allocN32Pixels(quad->texture_size.width(),
+ quad->texture_size.height());
if (on_demand_tile_raster_resource_id_)
resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_);
@@ -2298,9 +2296,7 @@ void GLRenderer::GetFramebufferPixelsAsync(
DCHECK(request->force_bitmap_result());
scoped_ptr<SkBitmap> bitmap(new SkBitmap);
- bitmap->setConfig(
- SkBitmap::kARGB_8888_Config, window_rect.width(), window_rect.height());
- bitmap->allocPixels();
+ bitmap->allocN32Pixels(window_rect.width(), window_rect.height());
scoped_ptr<SkAutoLockPixels> lock(new SkAutoLockPixels(*bitmap));
« no previous file with comments | « cc/layers/ui_resource_layer_unittest.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698