| OLD | NEW |
| 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 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture( | 2032 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture( |
| 2033 quad->texture_size, | 2033 quad->texture_size, |
| 2034 GL_TEXTURE_2D, | 2034 GL_TEXTURE_2D, |
| 2035 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, | 2035 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, |
| 2036 GL_CLAMP_TO_EDGE, | 2036 GL_CLAMP_TO_EDGE, |
| 2037 ResourceProvider::TextureHintImmutable, | 2037 ResourceProvider::TextureHintImmutable, |
| 2038 quad->texture_format); | 2038 quad->texture_format); |
| 2039 } | 2039 } |
| 2040 | 2040 |
| 2041 SkCanvas canvas(on_demand_tile_raster_bitmap_); | 2041 SkCanvas canvas(on_demand_tile_raster_bitmap_); |
| 2042 quad->picture_pile->RasterToBitmap( | 2042 quad->picture_pile->PlaybackToCanvas( |
| 2043 &canvas, quad->content_rect, quad->contents_scale, NULL); | 2043 &canvas, quad->content_rect, quad->contents_scale, NULL); |
| 2044 | 2044 |
| 2045 uint8_t* bitmap_pixels = NULL; | 2045 uint8_t* bitmap_pixels = NULL; |
| 2046 SkBitmap on_demand_tile_raster_bitmap_dest; | 2046 SkBitmap on_demand_tile_raster_bitmap_dest; |
| 2047 SkColorType colorType = ResourceFormatToSkColorType(quad->texture_format); | 2047 SkColorType colorType = ResourceFormatToSkColorType(quad->texture_format); |
| 2048 if (on_demand_tile_raster_bitmap_.colorType() != colorType) { | 2048 if (on_demand_tile_raster_bitmap_.colorType() != colorType) { |
| 2049 on_demand_tile_raster_bitmap_.copyTo(&on_demand_tile_raster_bitmap_dest, | 2049 on_demand_tile_raster_bitmap_.copyTo(&on_demand_tile_raster_bitmap_dest, |
| 2050 colorType); | 2050 colorType); |
| 2051 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the | 2051 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the |
| 2052 // bitmap data. This check will be removed once crbug.com/293728 is fixed. | 2052 // bitmap data. This check will be removed once crbug.com/293728 is fixed. |
| (...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3358 context_support_->ScheduleOverlayPlane( | 3358 context_support_->ScheduleOverlayPlane( |
| 3359 overlay.plane_z_order, | 3359 overlay.plane_z_order, |
| 3360 overlay.transform, | 3360 overlay.transform, |
| 3361 pending_overlay_resources_.back()->texture_id(), | 3361 pending_overlay_resources_.back()->texture_id(), |
| 3362 overlay.display_rect, | 3362 overlay.display_rect, |
| 3363 overlay.uv_rect); | 3363 overlay.uv_rect); |
| 3364 } | 3364 } |
| 3365 } | 3365 } |
| 3366 | 3366 |
| 3367 } // namespace cc | 3367 } // namespace cc |
| OLD | NEW |