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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 int dy, | 749 int dy, |
750 const gfx::Rect& rect) { | 750 const gfx::Rect& rect) { |
751 cc::Layer* layer = | 751 cc::Layer* layer = |
752 texture_layer_ ? texture_layer_.get() : compositor_layer_.get(); | 752 texture_layer_ ? texture_layer_.get() : compositor_layer_.get(); |
753 if (layer) { | 753 if (layer) { |
754 InvalidateRect(rect); | 754 InvalidateRect(rect); |
755 } else if (fullscreen_container_) { | 755 } else if (fullscreen_container_) { |
756 fullscreen_container_->ScrollRect(dx, dy, rect); | 756 fullscreen_container_->ScrollRect(dx, dy, rect); |
757 } else { | 757 } else { |
758 if (full_frame_ && !IsViewAccelerated()) { | 758 if (full_frame_ && !IsViewAccelerated()) { |
| 759 #ifdef SCROLL_RECT_REQUIRES_NO_DELTA |
| 760 container_->scrollRect(rect); |
| 761 #else |
759 container_->scrollRect(dx, dy, rect); | 762 container_->scrollRect(dx, dy, rect); |
| 763 #endif |
760 } else { | 764 } else { |
761 // Can't do optimized scrolling since there could be other elements on top | 765 // Can't do optimized scrolling since there could be other elements on top |
762 // of us or the view renders via the accelerated compositor which is | 766 // of us or the view renders via the accelerated compositor which is |
763 // incompatible with the move and backfill scrolling model. | 767 // incompatible with the move and backfill scrolling model. |
764 InvalidateRect(rect); | 768 InvalidateRect(rect); |
765 } | 769 } |
766 } | 770 } |
767 } | 771 } |
768 | 772 |
769 void PepperPluginInstanceImpl::CommitBackingTexture() { | 773 void PepperPluginInstanceImpl::CommitBackingTexture() { |
(...skipping 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3306 // Running out-of-process. Initiate an IPC call to notify the plugin | 3310 // Running out-of-process. Initiate an IPC call to notify the plugin |
3307 // process. | 3311 // process. |
3308 ppapi::proxy::HostDispatcher* dispatcher = | 3312 ppapi::proxy::HostDispatcher* dispatcher = |
3309 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3313 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
3310 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3314 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
3311 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3315 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
3312 } | 3316 } |
3313 } | 3317 } |
3314 | 3318 |
3315 } // namespace content | 3319 } // namespace content |
OLD | NEW |