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

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

Issue 1841443003: cc : Use effect tree to determine if a layer is inside copy request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/layer_impl.cc ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 gfx::Rect quad_rect(bounds()); 160 gfx::Rect quad_rect(bounds());
161 gfx::Rect opaque_rect = opaque ? quad_rect : gfx::Rect(); 161 gfx::Rect opaque_rect = opaque ? quad_rect : gfx::Rect();
162 gfx::Rect visible_quad_rect = 162 gfx::Rect visible_quad_rect =
163 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( 163 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect(
164 quad_rect); 164 quad_rect);
165 if (visible_quad_rect.IsEmpty()) 165 if (visible_quad_rect.IsEmpty())
166 return; 166 return;
167 167
168 if (!texture_mailbox_.secure_output_only() || 168 if (!texture_mailbox_.secure_output_only() ||
169 (layer_tree_impl()->OutputIsSecure() && !AnchestorHasCopyRequest())) { 169 (layer_tree_impl()->OutputIsSecure() && !InsideCopyRequest())) {
170 TextureDrawQuad* quad = 170 TextureDrawQuad* quad =
171 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); 171 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
172 ResourceId id = 172 ResourceId id =
173 valid_texture_copy_ ? texture_copy_->id() : external_texture_resource_; 173 valid_texture_copy_ ? texture_copy_->id() : external_texture_resource_;
174 quad->SetNew(shared_quad_state, quad_rect, opaque_rect, visible_quad_rect, 174 quad->SetNew(shared_quad_state, quad_rect, opaque_rect, visible_quad_rect,
175 id, premultiplied_alpha_, uv_top_left_, uv_bottom_right_, 175 id, premultiplied_alpha_, uv_top_left_, uv_bottom_right_,
176 bg_color, vertex_opacity_, flipped_, nearest_neighbor_); 176 bg_color, vertex_opacity_, flipped_, nearest_neighbor_);
177 if (!valid_texture_copy_) { 177 if (!valid_texture_copy_) {
178 quad->set_resource_size_in_pixels(texture_mailbox_.size_in_pixels()); 178 quad->set_resource_size_in_pixels(texture_mailbox_.size_in_pixels());
179 } 179 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } else if (external_texture_resource_) { 262 } else if (external_texture_resource_) {
263 DCHECK(!own_mailbox_); 263 DCHECK(!own_mailbox_);
264 ResourceProvider* resource_provider = 264 ResourceProvider* resource_provider =
265 layer_tree_impl()->resource_provider(); 265 layer_tree_impl()->resource_provider();
266 resource_provider->DeleteResource(external_texture_resource_); 266 resource_provider->DeleteResource(external_texture_resource_);
267 external_texture_resource_ = 0; 267 external_texture_resource_ = 0;
268 } 268 }
269 } 269 }
270 270
271 } // namespace cc 271 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698