| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layers/texture_layer_impl.h" | 5 #include "cc/layers/texture_layer_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "cc/output/renderer.h" | 10 #include "cc/output/renderer.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 gfx::Rect visible_quad_rect = | 160 gfx::Rect visible_quad_rect = |
| 161 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( | 161 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( |
| 162 quad_rect); | 162 quad_rect); |
| 163 if (visible_quad_rect.IsEmpty()) | 163 if (visible_quad_rect.IsEmpty()) |
| 164 return; | 164 return; |
| 165 | 165 |
| 166 TextureDrawQuad* quad = | 166 TextureDrawQuad* quad = |
| 167 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); | 167 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); |
| 168 ResourceProvider::ResourceId id = | 168 ResourceProvider::ResourceId id = |
| 169 valid_texture_copy_ ? texture_copy_->id() : external_texture_resource_; | 169 valid_texture_copy_ ? texture_copy_->id() : external_texture_resource_; |
| 170 // TODO(danakj): crbug.com/455931 |
| 171 layer_tree_impl()->resource_provider()->ValidateResource(id); |
| 170 quad->SetNew(shared_quad_state, | 172 quad->SetNew(shared_quad_state, |
| 171 quad_rect, | 173 quad_rect, |
| 172 opaque_rect, | 174 opaque_rect, |
| 173 visible_quad_rect, | 175 visible_quad_rect, |
| 174 id, | 176 id, |
| 175 premultiplied_alpha_, | 177 premultiplied_alpha_, |
| 176 uv_top_left_, | 178 uv_top_left_, |
| 177 uv_bottom_right_, | 179 uv_bottom_right_, |
| 178 bg_color, | 180 bg_color, |
| 179 vertex_opacity_, | 181 vertex_opacity_, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 } else if (external_texture_resource_) { | 258 } else if (external_texture_resource_) { |
| 257 DCHECK(!own_mailbox_); | 259 DCHECK(!own_mailbox_); |
| 258 ResourceProvider* resource_provider = | 260 ResourceProvider* resource_provider = |
| 259 layer_tree_impl()->resource_provider(); | 261 layer_tree_impl()->resource_provider(); |
| 260 resource_provider->DeleteResource(external_texture_resource_); | 262 resource_provider->DeleteResource(external_texture_resource_); |
| 261 external_texture_resource_ = 0; | 263 external_texture_resource_ = 0; |
| 262 } | 264 } |
| 263 } | 265 } |
| 264 | 266 |
| 265 } // namespace cc | 267 } // namespace cc |
| OLD | NEW |