OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bit_cast.h" | 10 #include "base/bit_cast.h" |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 original_instance_interface_.reset(); | 677 original_instance_interface_.reset(); |
678 instance_interface_.reset(); | 678 instance_interface_.reset(); |
679 | 679 |
680 if (fullscreen_container_) { | 680 if (fullscreen_container_) { |
681 fullscreen_container_->Destroy(); | 681 fullscreen_container_->Destroy(); |
682 fullscreen_container_ = NULL; | 682 fullscreen_container_ = NULL; |
683 } | 683 } |
684 | 684 |
685 // Force-unbind any Graphics. In the case of Graphics2D, if the plugin | 685 // Force-unbind any Graphics. In the case of Graphics2D, if the plugin |
686 // leaks the graphics 2D, it may actually get cleaned up after our | 686 // leaks the graphics 2D, it may actually get cleaned up after our |
687 // destruction, so we need its pointers to be up-to-date. | 687 // destruction, so we need its pointers to be up to date. |
688 BindGraphics(pp_instance(), 0); | 688 BindGraphics(pp_instance(), 0); |
689 container_ = NULL; | 689 container_ = NULL; |
690 } | 690 } |
691 | 691 |
692 bool PepperPluginInstanceImpl::is_deleted() const { return is_deleted_; } | 692 bool PepperPluginInstanceImpl::is_deleted() const { return is_deleted_; } |
693 | 693 |
694 void PepperPluginInstanceImpl::Paint(WebCanvas* canvas, | 694 void PepperPluginInstanceImpl::Paint(WebCanvas* canvas, |
695 const gfx::Rect& plugin_rect, | 695 const gfx::Rect& plugin_rect, |
696 const gfx::Rect& paint_rect) { | 696 const gfx::Rect& paint_rect) { |
697 TRACE_EVENT0("ppapi", "PluginInstance::Paint"); | 697 TRACE_EVENT0("ppapi", "PluginInstance::Paint"); |
(...skipping 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3405 const cc::TextureMailbox& mailbox) const { | 3405 const cc::TextureMailbox& mailbox) const { |
3406 auto it = | 3406 auto it = |
3407 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3407 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
3408 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3408 [&mailbox](const TextureMailboxRefCount& ref_count) { |
3409 return ref_count.first.mailbox() == mailbox.mailbox(); | 3409 return ref_count.first.mailbox() == mailbox.mailbox(); |
3410 }); | 3410 }); |
3411 return it != texture_ref_counts_.end(); | 3411 return it != texture_ref_counts_.end(); |
3412 } | 3412 } |
3413 | 3413 |
3414 } // namespace content | 3414 } // namespace content |
OLD | NEW |