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

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

Issue 1968363002: SurfaceAggregator should check whether output is secure when drawin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/layer_impl.h ('k') | cc/layers/nine_patch_layer_impl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layer_impl.h" 5 #include "cc/layers/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 <algorithm> 10 #include <algorithm>
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 gfx::Rect request_in_layer_space = request->area(); 250 gfx::Rect request_in_layer_space = request->area();
251 request_in_layer_space.Intersect(gfx::Rect(bounds())); 251 request_in_layer_space.Intersect(gfx::Rect(bounds()));
252 request->set_area(MathUtil::MapEnclosingClippedRect( 252 request->set_area(MathUtil::MapEnclosingClippedRect(
253 DrawTransform(), request_in_layer_space)); 253 DrawTransform(), request_in_layer_space));
254 } 254 }
255 255
256 layer_tree_impl()->RemoveLayerWithCopyOutputRequest(this); 256 layer_tree_impl()->RemoveLayerWithCopyOutputRequest(this);
257 layer_tree_impl()->set_needs_update_draw_properties(); 257 layer_tree_impl()->set_needs_update_draw_properties();
258 } 258 }
259 259
260 bool LayerImpl::InsideCopyRequest() const {
261 EffectTree& effect_tree = layer_tree_impl()->property_trees()->effect_tree;
262 EffectNode* node = effect_tree.Node(effect_tree_index_);
263
264 for (; node; node = effect_tree.parent(node)) {
265 if (node->data.has_copy_request)
266 return true;
267 }
268 return false;
269 }
270
271 void LayerImpl::ClearRenderSurfaceLayerList() { 260 void LayerImpl::ClearRenderSurfaceLayerList() {
272 if (render_surface_) 261 if (render_surface_)
273 render_surface_->ClearLayerLists(); 262 render_surface_->ClearLayerLists();
274 } 263 }
275 264
276 void LayerImpl::PopulateSharedQuadState(SharedQuadState* state) const { 265 void LayerImpl::PopulateSharedQuadState(SharedQuadState* state) const {
277 state->SetAll(draw_properties_.target_space_transform, bounds(), 266 state->SetAll(draw_properties_.target_space_transform, bounds(),
278 draw_properties_.visible_layer_rect, draw_properties_.clip_rect, 267 draw_properties_.visible_layer_rect, draw_properties_.clip_rect,
279 draw_properties_.is_clipped, draw_properties_.opacity, 268 draw_properties_.is_clipped, draw_properties_.opacity,
280 draw_blend_mode_, sorting_context_id_); 269 draw_blend_mode_, sorting_context_id_);
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 .layer_transforms_should_scale_layer_contents) { 1400 .layer_transforms_should_scale_layer_contents) {
1412 return default_scale; 1401 return default_scale;
1413 } 1402 }
1414 1403
1415 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1404 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1416 DrawTransform(), default_scale); 1405 DrawTransform(), default_scale);
1417 return std::max(transform_scales.x(), transform_scales.y()); 1406 return std::max(transform_scales.x(), transform_scales.y());
1418 } 1407 }
1419 1408
1420 } // namespace cc 1409 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/nine_patch_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698