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 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 return; | 1902 return; |
1903 | 1903 |
1904 gpu::Mailbox mailbox; | 1904 gpu::Mailbox mailbox; |
1905 uint32 sync_point = 0; | 1905 uint32 sync_point = 0; |
1906 if (bound_graphics_3d_.get()) { | 1906 if (bound_graphics_3d_.get()) { |
1907 PlatformContext3D* context = bound_graphics_3d_->platform_context(); | 1907 PlatformContext3D* context = bound_graphics_3d_->platform_context(); |
1908 context->GetBackingMailbox(&mailbox, &sync_point); | 1908 context->GetBackingMailbox(&mailbox, &sync_point); |
1909 DCHECK_EQ(mailbox.IsZero(), sync_point == 0); | 1909 DCHECK_EQ(mailbox.IsZero(), sync_point == 0); |
1910 } | 1910 } |
1911 bool want_3d_layer = !mailbox.IsZero(); | 1911 bool want_3d_layer = !mailbox.IsZero(); |
1912 bool want_2d_layer = bound_graphics_2d_platform_ && | 1912 bool want_2d_layer = !!bound_graphics_2d_platform_; |
1913 CommandLine::ForCurrentProcess()->HasSwitch( | |
1914 switches::kEnableSoftwareCompositing); | |
1915 bool want_layer = want_3d_layer || want_2d_layer; | 1913 bool want_layer = want_3d_layer || want_2d_layer; |
1916 | 1914 |
1917 if ((want_layer == !!texture_layer_.get()) && | 1915 if ((want_layer == !!texture_layer_.get()) && |
1918 (want_3d_layer == layer_is_hardware_) && | 1916 (want_3d_layer == layer_is_hardware_) && |
1919 layer_bound_to_fullscreen_ == !!fullscreen_container_) { | 1917 layer_bound_to_fullscreen_ == !!fullscreen_container_) { |
1920 UpdateLayerTransform(); | 1918 UpdateLayerTransform(); |
1921 return; | 1919 return; |
1922 } | 1920 } |
1923 | 1921 |
1924 if (texture_layer_) { | 1922 if (texture_layer_) { |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3141 // Running out-of-process. Initiate an IPC call to notify the plugin | 3139 // Running out-of-process. Initiate an IPC call to notify the plugin |
3142 // process. | 3140 // process. |
3143 ppapi::proxy::HostDispatcher* dispatcher = | 3141 ppapi::proxy::HostDispatcher* dispatcher = |
3144 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3142 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
3145 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3143 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
3146 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3144 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
3147 } | 3145 } |
3148 } | 3146 } |
3149 | 3147 |
3150 } // namespace content | 3148 } // namespace content |
OLD | NEW |