OLD | NEW |
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 Loading... |
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 |
OLD | NEW |