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 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1696 quad->texture_size.height()); | 1696 quad->texture_size.height()); |
1697 on_demand_tile_raster_bitmap_.allocPixels(); | 1697 on_demand_tile_raster_bitmap_.allocPixels(); |
1698 | 1698 |
1699 if (on_demand_tile_raster_resource_id_) | 1699 if (on_demand_tile_raster_resource_id_) |
1700 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); | 1700 resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_); |
1701 | 1701 |
1702 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture( | 1702 on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture( |
1703 quad->texture_size, | 1703 quad->texture_size, |
1704 GL_RGBA, | 1704 GL_RGBA, |
1705 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, | 1705 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM, |
| 1706 GL_CLAMP_TO_EDGE, |
1706 ResourceProvider::TextureUsageAny); | 1707 ResourceProvider::TextureUsageAny); |
1707 } | 1708 } |
1708 | 1709 |
1709 SkDevice device(on_demand_tile_raster_bitmap_); | 1710 SkDevice device(on_demand_tile_raster_bitmap_); |
1710 SkCanvas canvas(&device); | 1711 SkCanvas canvas(&device); |
1711 | 1712 |
1712 quad->picture_pile->RasterToBitmap(&canvas, quad->content_rect, | 1713 quad->picture_pile->RasterToBitmap(&canvas, quad->content_rect, |
1713 quad->contents_scale, NULL); | 1714 quad->contents_scale, NULL); |
1714 | 1715 |
1715 resource_provider_->SetPixels( | 1716 resource_provider_->SetPixels( |
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3156 std::string unique_context_name = base::StringPrintf( | 3157 std::string unique_context_name = base::StringPrintf( |
3157 "%s-Offscreen-%p", | 3158 "%s-Offscreen-%p", |
3158 Settings().compositor_name.c_str(), | 3159 Settings().compositor_name.c_str(), |
3159 context_); | 3160 context_); |
3160 resource_provider()->offscreen_context_provider()->Context3d()-> | 3161 resource_provider()->offscreen_context_provider()->Context3d()-> |
3161 pushGroupMarkerEXT(unique_context_name.c_str()); | 3162 pushGroupMarkerEXT(unique_context_name.c_str()); |
3162 } | 3163 } |
3163 | 3164 |
3164 | 3165 |
3165 } // namespace cc | 3166 } // namespace cc |
OLD | NEW |