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/npapi/webplugin_impl.h" | 5 #include "content/renderer/npapi/webplugin_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 // Deferring the call to setBackingIOSurfaceId is an attempt to | 854 // Deferring the call to setBackingIOSurfaceId is an attempt to |
855 // work around garbage occasionally showing up in the plugin's | 855 // work around garbage occasionally showing up in the plugin's |
856 // area during live resizing of Core Animation plugins. The | 856 // area during live resizing of Core Animation plugins. The |
857 // assumption was that by the time this was called, the plugin | 857 // assumption was that by the time this was called, the plugin |
858 // process would have populated the newly allocated IOSurface. It | 858 // process would have populated the newly allocated IOSurface. It |
859 // is not 100% clear at this point why any garbage is getting | 859 // is not 100% clear at this point why any garbage is getting |
860 // through. More investigation is needed. http://crbug.com/105346 | 860 // through. More investigation is needed. http://crbug.com/105346 |
861 if (next_io_surface_allocated_) { | 861 if (next_io_surface_allocated_) { |
862 if (next_io_surface_id_) { | 862 if (next_io_surface_id_) { |
863 if (!io_surface_layer_.get()) { | 863 if (!io_surface_layer_.get()) { |
864 io_surface_layer_ = cc::IOSurfaceLayer::Create(); | 864 io_surface_layer_ = |
| 865 cc::IOSurfaceLayer::Create(cc_blink::WebLayerImpl::LayerSettings()); |
865 web_layer_.reset(new cc_blink::WebLayerImpl(io_surface_layer_)); | 866 web_layer_.reset(new cc_blink::WebLayerImpl(io_surface_layer_)); |
866 container_->setWebLayer(web_layer_.get()); | 867 container_->setWebLayer(web_layer_.get()); |
867 } | 868 } |
868 io_surface_layer_->SetIOSurfaceProperties( | 869 io_surface_layer_->SetIOSurfaceProperties( |
869 next_io_surface_id_, | 870 next_io_surface_id_, |
870 gfx::Size(next_io_surface_width_, next_io_surface_height_)); | 871 gfx::Size(next_io_surface_width_, next_io_surface_height_)); |
871 } else { | 872 } else { |
872 container_->setWebLayer(NULL); | 873 container_->setWebLayer(NULL); |
873 web_layer_.reset(); | 874 web_layer_.reset(); |
874 io_surface_layer_ = NULL; | 875 io_surface_layer_ = NULL; |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 case PLUGIN_SRC: | 1540 case PLUGIN_SRC: |
1540 webframe_->setReferrerForRequest(*request, plugin_url_); | 1541 webframe_->setReferrerForRequest(*request, plugin_url_); |
1541 break; | 1542 break; |
1542 | 1543 |
1543 default: | 1544 default: |
1544 break; | 1545 break; |
1545 } | 1546 } |
1546 } | 1547 } |
1547 | 1548 |
1548 } // namespace content | 1549 } // namespace content |
OLD | NEW |