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

Unified Diff: content/renderer/pepper/pepper_compositor_host.cc

Issue 505013002: Remove implicit conversions from scoped_refptr to T* in content/renderer/pepper/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_graphics_2d_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_compositor_host.cc
diff --git a/content/renderer/pepper/pepper_compositor_host.cc b/content/renderer/pepper/pepper_compositor_host.cc
index 6116a36be4180153f766ce0e78013d4c5f0873c5..e372b1b01c7f6d5448a91cd683e9f1c5f9e2086e 100644
--- a/content/renderer/pepper/pepper_compositor_host.cc
+++ b/content/renderer/pepper/pepper_compositor_host.cc
@@ -219,19 +219,19 @@ void PepperCompositorHost::UpdateLayer(
new_layer->common.clip_rect.size.width != 0 ||
new_layer->common.clip_rect.size.height != 0) {
scoped_refptr<cc::Layer> clip_parent = layer->parent();
- if (clip_parent == layer_) {
+ if (clip_parent.get() == layer_.get()) {
// Create a clip parent layer, if it does not exist.
clip_parent = cc::Layer::Create();
clip_parent->SetMasksToBounds(true);
clip_parent->SetIsDrawable(true);
- layer_->ReplaceChild(layer, clip_parent);
+ layer_->ReplaceChild(layer.get(), clip_parent);
clip_parent->AddChild(layer);
}
gfx::Point position = PP_ToGfxPoint(new_layer->common.clip_rect.point);
clip_parent->SetPosition(position);
clip_parent->SetBounds(PP_ToGfxSize(new_layer->common.clip_rect.size));
layer->SetPosition(gfx::Point(-position.x(), -position.y()));
- } else if (layer->parent() != layer_) {
+ } else if (layer->parent() != layer_.get()) {
// Remove the clip parent layer.
layer_->ReplaceChild(layer->parent(), layer);
layer->SetPosition(gfx::Point());
@@ -348,11 +348,11 @@ int32_t PepperCompositorHost::OnHostMsgCommitLayers(
for (size_t i = 0; i < layers.size(); ++i) {
const ppapi::CompositorLayerData* pp_layer = &layers[i];
LayerData* data = i >= layers_.size() ? NULL : &layers_[i];
- DCHECK(!data || data->cc_layer);
+ DCHECK(!data || data->cc_layer.get());
scoped_refptr<cc::Layer> cc_layer = data ? data->cc_layer : NULL;
ppapi::CompositorLayerData* old_layer = data ? &data->pp_layer : NULL;
- if (!cc_layer) {
+ if (!cc_layer.get()) {
if (pp_layer->color)
cc_layer = cc::SolidColorLayer::Create();
else if (pp_layer->texture || pp_layer->image)
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_graphics_2d_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698