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 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1900 ResourceProvider::TextureUsageAny, | 1900 ResourceProvider::TextureUsageAny, |
1901 quad->texture_format); | 1901 quad->texture_format); |
1902 } | 1902 } |
1903 | 1903 |
1904 // Create and run on-demand raster task for tile. | 1904 // Create and run on-demand raster task for tile. |
1905 scoped_refptr<Task> on_demand_raster_task( | 1905 scoped_refptr<Task> on_demand_raster_task( |
1906 new OnDemandRasterTaskImpl(quad->picture_pile, | 1906 new OnDemandRasterTaskImpl(quad->picture_pile, |
1907 &on_demand_tile_raster_bitmap_, | 1907 &on_demand_tile_raster_bitmap_, |
1908 quad->content_rect, | 1908 quad->content_rect, |
1909 quad->contents_scale)); | 1909 quad->contents_scale)); |
1910 RunOnDemandRasterTask(on_demand_raster_task.get()); | 1910 client_->RunOnDemandRasterTask(on_demand_raster_task.get()); |
1911 | 1911 |
1912 uint8_t* bitmap_pixels = NULL; | 1912 uint8_t* bitmap_pixels = NULL; |
1913 SkBitmap on_demand_tile_raster_bitmap_dest; | 1913 SkBitmap on_demand_tile_raster_bitmap_dest; |
1914 SkColorType colorType = ResourceFormatToSkColorType(quad->texture_format); | 1914 SkColorType colorType = ResourceFormatToSkColorType(quad->texture_format); |
1915 if (on_demand_tile_raster_bitmap_.colorType() != colorType) { | 1915 if (on_demand_tile_raster_bitmap_.colorType() != colorType) { |
1916 on_demand_tile_raster_bitmap_.copyTo(&on_demand_tile_raster_bitmap_dest, | 1916 on_demand_tile_raster_bitmap_.copyTo(&on_demand_tile_raster_bitmap_dest, |
1917 colorType); | 1917 colorType); |
1918 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the | 1918 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the |
1919 // bitmap data. This check will be removed once crbug.com/293728 is fixed. | 1919 // bitmap data. This check will be removed once crbug.com/293728 is fixed. |
1920 CHECK_EQ(0u, on_demand_tile_raster_bitmap_dest.rowBytes() % 4); | 1920 CHECK_EQ(0u, on_demand_tile_raster_bitmap_dest.rowBytes() % 4); |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3180 context_support_->ScheduleOverlayPlane( | 3180 context_support_->ScheduleOverlayPlane( |
3181 overlay.plane_z_order, | 3181 overlay.plane_z_order, |
3182 overlay.transform, | 3182 overlay.transform, |
3183 pending_overlay_resources_.back()->texture_id(), | 3183 pending_overlay_resources_.back()->texture_id(), |
3184 overlay.display_rect, | 3184 overlay.display_rect, |
3185 overlay.uv_rect); | 3185 overlay.uv_rect); |
3186 } | 3186 } |
3187 } | 3187 } |
3188 | 3188 |
3189 } // namespace cc | 3189 } // namespace cc |
OLD | NEW |