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 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1688 quad->texture_size.height()); | 1688 quad->texture_size.height()); |
1689 on_demand_tile_raster_bitmap_.allocPixels(); | 1689 on_demand_tile_raster_bitmap_.allocPixels(); |
1690 | 1690 |
1691 if (on_demand_tile_raster_resource_id_) | 1691 if (on_demand_tile_raster_resource_id_) |
1692 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); | 1692 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); |
1693 | 1693 |
1694 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture( | 1694 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture( |
1695 quad->texture_size, | 1695 quad->texture_size, |
1696 GL_RGBA, | 1696 GL_RGBA, |
1697 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, | 1697 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, |
| 1698 GL_CLAMP_TO_EDGE, |
1698 ResourceProvider::TextureUsageAny); | 1699 ResourceProvider::TextureUsageAny); |
1699 } | 1700 } |
1700 | 1701 |
1701 SkBitmapDevice device(on_demand_tile_raster_bitmap_); | 1702 SkBitmapDevice device(on_demand_tile_raster_bitmap_); |
1702 SkCanvas canvas(&device); | 1703 SkCanvas canvas(&device); |
1703 | 1704 |
1704 quad->picture_pile->RasterToBitmap(&canvas, quad->content_rect, | 1705 quad->picture_pile->RasterToBitmap(&canvas, quad->content_rect, |
1705 quad->contents_scale, NULL); | 1706 quad->contents_scale, NULL); |
1706 | 1707 |
1707 resource_provider_->SetPixels( | 1708 resource_provider_->SetPixels( |
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3150 std::string unique_context_name = base::StringPrintf( | 3151 std::string unique_context_name = base::StringPrintf( |
3151 "%s-Offscreen-%p", | 3152 "%s-Offscreen-%p", |
3152 Settings().compositor_name.c_str(), | 3153 Settings().compositor_name.c_str(), |
3153 context_); | 3154 context_); |
3154 offscreen_context_provider->Context3d()->pushGroupMarkerEXT( | 3155 offscreen_context_provider->Context3d()->pushGroupMarkerEXT( |
3155 unique_context_name.c_str()); | 3156 unique_context_name.c_str()); |
3156 } | 3157 } |
3157 | 3158 |
3158 | 3159 |
3159 } // namespace cc | 3160 } // namespace cc |
OLD | NEW |