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

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

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

Powered by Google App Engine
This is Rietveld 408576698