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

Side by Side Diff: cc/output/gl_renderer.cc

Issue 683863003: Remove some of the instrumentation plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with latest Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/software_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture( 1998 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture(
1999 quad->texture_size, 1999 quad->texture_size,
2000 GL_TEXTURE_2D, 2000 GL_TEXTURE_2D,
2001 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, 2001 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM,
2002 GL_CLAMP_TO_EDGE, 2002 GL_CLAMP_TO_EDGE,
2003 ResourceProvider::TextureHintImmutable, 2003 ResourceProvider::TextureHintImmutable,
2004 quad->texture_format); 2004 quad->texture_format);
2005 } 2005 }
2006 2006
2007 SkCanvas canvas(on_demand_tile_raster_bitmap_); 2007 SkCanvas canvas(on_demand_tile_raster_bitmap_);
2008 quad->picture_pile->PlaybackToCanvas( 2008 quad->picture_pile->PlaybackToCanvas(&canvas, quad->content_rect,
2009 &canvas, quad->content_rect, quad->contents_scale, NULL); 2009 quad->contents_scale);
2010 2010
2011 uint8_t* bitmap_pixels = NULL; 2011 uint8_t* bitmap_pixels = NULL;
2012 SkBitmap on_demand_tile_raster_bitmap_dest; 2012 SkBitmap on_demand_tile_raster_bitmap_dest;
2013 SkColorType colorType = ResourceFormatToSkColorType(quad->texture_format); 2013 SkColorType colorType = ResourceFormatToSkColorType(quad->texture_format);
2014 if (on_demand_tile_raster_bitmap_.colorType() != colorType) { 2014 if (on_demand_tile_raster_bitmap_.colorType() != colorType) {
2015 on_demand_tile_raster_bitmap_.copyTo(&on_demand_tile_raster_bitmap_dest, 2015 on_demand_tile_raster_bitmap_.copyTo(&on_demand_tile_raster_bitmap_dest,
2016 colorType); 2016 colorType);
2017 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the 2017 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the
2018 // bitmap data. This check will be removed once crbug.com/293728 is fixed. 2018 // bitmap data. This check will be removed once crbug.com/293728 is fixed.
2019 CHECK_EQ(0u, on_demand_tile_raster_bitmap_dest.rowBytes() % 4); 2019 CHECK_EQ(0u, on_demand_tile_raster_bitmap_dest.rowBytes() % 4);
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
3343 context_support_->ScheduleOverlayPlane( 3343 context_support_->ScheduleOverlayPlane(
3344 overlay.plane_z_order, 3344 overlay.plane_z_order,
3345 overlay.transform, 3345 overlay.transform,
3346 pending_overlay_resources_.back()->texture_id(), 3346 pending_overlay_resources_.back()->texture_id(),
3347 overlay.display_rect, 3347 overlay.display_rect,
3348 overlay.uv_rect); 3348 overlay.uv_rect);
3349 } 3349 }
3350 } 3350 }
3351 3351
3352 } // namespace cc 3352 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/software_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698