Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: cc/layers/texture_layer_impl.cc

Issue 1144523003: Rename cc::ResourceProvider::ResourceId to cc::ResourceId and move it to its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/texture_layer_impl.h ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 gfx::Rect quad_rect(content_bounds()); 158 gfx::Rect quad_rect(content_bounds());
159 gfx::Rect opaque_rect = opaque ? quad_rect : gfx::Rect(); 159 gfx::Rect opaque_rect = opaque ? quad_rect : gfx::Rect();
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 ResourceId id =
169 valid_texture_copy_ ? texture_copy_->id() : external_texture_resource_; 169 valid_texture_copy_ ? texture_copy_->id() : external_texture_resource_;
170 quad->SetNew(shared_quad_state, 170 quad->SetNew(shared_quad_state,
171 quad_rect, 171 quad_rect,
172 opaque_rect, 172 opaque_rect,
173 visible_quad_rect, 173 visible_quad_rect,
174 id, 174 id,
175 premultiplied_alpha_, 175 premultiplied_alpha_,
176 uv_top_left_, 176 uv_top_left_,
177 uv_bottom_right_, 177 uv_bottom_right_,
178 bg_color, 178 bg_color,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } else if (external_texture_resource_) { 257 } else if (external_texture_resource_) {
258 DCHECK(!own_mailbox_); 258 DCHECK(!own_mailbox_);
259 ResourceProvider* resource_provider = 259 ResourceProvider* resource_provider =
260 layer_tree_impl()->resource_provider(); 260 layer_tree_impl()->resource_provider();
261 resource_provider->DeleteResource(external_texture_resource_); 261 resource_provider->DeleteResource(external_texture_resource_);
262 external_texture_resource_ = 0; 262 external_texture_resource_ = 0;
263 } 263 }
264 } 264 }
265 265
266 } // namespace cc 266 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_impl.h ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698