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

Side by Side Diff: content/renderer/pepper/pepper_compositor_host.cc

Issue 2331983002: cc: Make LayerTreeHost a protected Layer member. (Closed)
Patch Set: settings Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/renderer/pepper/pepper_compositor_host.h" 5 #include "content/renderer/pepper/pepper_compositor_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 if (old_layer) 404 if (old_layer)
405 *old_layer = *pp_layer; 405 *old_layer = *pp_layer;
406 else 406 else
407 layers_.push_back(LayerData(cc_layer, *pp_layer)); 407 layers_.push_back(LayerData(cc_layer, *pp_layer));
408 } 408 }
409 409
410 // We need to force a commit for each CommitLayers() call, even if no layers 410 // We need to force a commit for each CommitLayers() call, even if no layers
411 // changed since the last call to CommitLayers(). This is so 411 // changed since the last call to CommitLayers(). This is so
412 // WiewInitiatedPaint() will always be called. 412 // WiewInitiatedPaint() will always be called.
413 if (layer_->layer_tree_host()) 413 if (layer_->GetLayerTree())
414 layer_->layer_tree_host()->SetNeedsCommit(); 414 layer_->GetLayerTree()->SetNeedsCommit();
415 415
416 // If the host is not bound to the instance, return PP_OK immediately. 416 // If the host is not bound to the instance, return PP_OK immediately.
417 if (!bound_instance_) 417 if (!bound_instance_)
418 return PP_OK; 418 return PP_OK;
419 419
420 commit_layers_reply_context_ = context->MakeReplyMessageContext(); 420 commit_layers_reply_context_ = context->MakeReplyMessageContext();
421 return PP_OK_COMPLETIONPENDING; 421 return PP_OK_COMPLETIONPENDING;
422 } 422 }
423 423
424 } // namespace content 424 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/property_tree_builder.cc ('k') | third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698