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

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

Issue 2859483006: cc: Enable composited border-radius scrolling.
Patch Set: Fix webkit unit tests. Created 3 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
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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 OwningEffectNode()->surface_contents_scale; 403 OwningEffectNode()->surface_contents_scale;
404 PictureLayerImpl* mask_layer = static_cast<PictureLayerImpl*>(MaskLayer()); 404 PictureLayerImpl* mask_layer = static_cast<PictureLayerImpl*>(MaskLayer());
405 if (mask_layer && mask_layer->DrawsContent() && 405 if (mask_layer && mask_layer->DrawsContent() &&
406 !mask_layer->bounds().IsEmpty()) { 406 !mask_layer->bounds().IsEmpty()) {
407 // The software renderer applies mask layer and blending in the wrong 407 // The software renderer applies mask layer and blending in the wrong
408 // order but kDstIn doesn't commute with masking. It is okay to not 408 // order but kDstIn doesn't commute with masking. It is okay to not
409 // support this configuration because kDstIn was introduced to replace 409 // support this configuration because kDstIn was introduced to replace
410 // mask layers. 410 // mask layers.
411 DCHECK(BlendMode() != SkBlendMode::kDstIn) 411 DCHECK(BlendMode() != SkBlendMode::kDstIn)
412 << "kDstIn blend mode with mask layer is unsupported."; 412 << "kDstIn blend mode with mask layer is unsupported.";
413 TRACE_EVENT1("cc", "RenderSurfaceImpl::AppendQuads",
414 "mask_layer_gpu_memory_usage",
415 mask_layer->GPUMemoryUsageInBytes());
413 if (mask_layer->mask_type() == Layer::LayerMaskType::MULTI_TEXTURE_MASK) { 416 if (mask_layer->mask_type() == Layer::LayerMaskType::MULTI_TEXTURE_MASK) {
414 TileMaskLayer(render_pass, shared_quad_state, visible_layer_rect); 417 TileMaskLayer(render_pass, shared_quad_state, visible_layer_rect);
415 return; 418 return;
416 } 419 }
417 gfx::SizeF mask_uv_size; 420 gfx::SizeF mask_uv_size;
418 mask_layer->GetContentsResourceId(&mask_resource_id, &mask_texture_size, 421 mask_layer->GetContentsResourceId(&mask_resource_id, &mask_texture_size,
419 &mask_uv_size); 422 &mask_uv_size);
420 gfx::SizeF unclipped_mask_target_size = gfx::ScaleSize( 423 gfx::SizeF unclipped_mask_target_size = gfx::ScaleSize(
421 gfx::SizeF(OwningEffectNode()->unscaled_mask_target_size), 424 gfx::SizeF(OwningEffectNode()->unscaled_mask_target_size),
422 surface_contents_scale.x(), surface_contents_scale.y()); 425 surface_contents_scale.x(), surface_contents_scale.y());
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 NOTIMPLEMENTED(); 545 NOTIMPLEMENTED();
543 break; 546 break;
544 default: 547 default:
545 NOTREACHED(); 548 NOTREACHED();
546 break; 549 break;
547 } 550 }
548 } 551 }
549 } 552 }
550 553
551 } // namespace cc 554 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698