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

Unified Diff: cc/output/gl_renderer.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 | « 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 b3885055cf189ab17bd5798c8928dd7b54efb12d..7e0e14a1e109046e6f399469374673b0e5e7df7d 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -1738,10 +1738,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_);
@@ -2297,9 +2295,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