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

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

Issue 2859483006: cc: Enable composited border-radius scrolling.
Patch Set: fix layout tests Created 3 years, 6 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
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/render_surface_impl.h" 5 #include "cc/layers/render_surface_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 OwningEffectNode()->surface_contents_scale; 395 OwningEffectNode()->surface_contents_scale;
396 PictureLayerImpl* mask_layer = static_cast<PictureLayerImpl*>(MaskLayer()); 396 PictureLayerImpl* mask_layer = static_cast<PictureLayerImpl*>(MaskLayer());
397 if (mask_layer && mask_layer->DrawsContent() && 397 if (mask_layer && mask_layer->DrawsContent() &&
398 !mask_layer->bounds().IsEmpty()) { 398 !mask_layer->bounds().IsEmpty()) {
399 // The software renderer applies mask layer and blending in the wrong 399 // The software renderer applies mask layer and blending in the wrong
400 // order but kDstIn doesn't commute with masking. It is okay to not 400 // order but kDstIn doesn't commute with masking. It is okay to not
401 // support this configuration because kDstIn was introduced to replace 401 // support this configuration because kDstIn was introduced to replace
402 // mask layers. 402 // mask layers.
403 DCHECK(BlendMode() != SkBlendMode::kDstIn) 403 DCHECK(BlendMode() != SkBlendMode::kDstIn)
404 << "kDstIn blend mode with mask layer is unsupported."; 404 << "kDstIn blend mode with mask layer is unsupported.";
405 TRACE_EVENT1("cc", "RenderSurfaceImpl::AppendQuads",
406 "mask_layer_gpu_memory_usage",
407 mask_layer->GPUMemoryUsageInBytes());
405 if (mask_layer->mask_type() == Layer::LayerMaskType::MULTI_TEXTURE_MASK) { 408 if (mask_layer->mask_type() == Layer::LayerMaskType::MULTI_TEXTURE_MASK) {
406 TileMaskLayer(render_pass, shared_quad_state, visible_layer_rect); 409 TileMaskLayer(render_pass, shared_quad_state, visible_layer_rect);
407 return; 410 return;
408 } 411 }
409 gfx::SizeF mask_uv_size; 412 gfx::SizeF mask_uv_size;
410 mask_layer->GetContentsResourceId(&mask_resource_id, &mask_texture_size, 413 mask_layer->GetContentsResourceId(&mask_resource_id, &mask_texture_size,
411 &mask_uv_size); 414 &mask_uv_size);
412 gfx::SizeF unclipped_mask_target_size = gfx::ScaleSize( 415 gfx::SizeF unclipped_mask_target_size = gfx::ScaleSize(
413 gfx::SizeF(OwningEffectNode()->unscaled_mask_target_size), 416 gfx::SizeF(OwningEffectNode()->unscaled_mask_target_size),
414 surface_contents_scale.x(), surface_contents_scale.y()); 417 surface_contents_scale.x(), surface_contents_scale.y());
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 NOTIMPLEMENTED(); 536 NOTIMPLEMENTED();
534 break; 537 break;
535 default: 538 default:
536 NOTREACHED(); 539 NOTREACHED();
537 break; 540 break;
538 } 541 }
539 } 542 }
540 } 543 }
541 544
542 } // namespace cc 545 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/draw_property_utils.cc » ('j') | third_party/WebKit/LayoutTests/TestExpectations » ('J')

Powered by Google App Engine
This is Rietveld 408576698