Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: content/renderer/npapi/webplugin_impl.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/location.h" 10 #include "base/location.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/metrics/user_metrics_action.h" 13 #include "base/metrics/user_metrics_action.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "base/thread_task_runner_handle.h" 18 #include "base/thread_task_runner_handle.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "cc/blink/web_layer_impl.h" 20 #include "cc/blink/web_layer_impl.h"
21 #include "cc/layers/io_surface_layer.h" 21 #include "cc/layers/io_surface_layer.h"
22 #include "cc/layers/layer_settings.h"
23 #include "content/child/appcache/web_application_cache_host_impl.h" 22 #include "content/child/appcache/web_application_cache_host_impl.h"
24 #include "content/child/npapi/plugin_host.h" 23 #include "content/child/npapi/plugin_host.h"
25 #include "content/child/npapi/plugin_instance.h" 24 #include "content/child/npapi/plugin_instance.h"
26 #include "content/child/npapi/webplugin_delegate_impl.h" 25 #include "content/child/npapi/webplugin_delegate_impl.h"
27 #include "content/child/npapi/webplugin_resource_client.h" 26 #include "content/child/npapi/webplugin_resource_client.h"
28 #include "content/common/view_messages.h" 27 #include "content/common/view_messages.h"
29 #include "content/public/common/content_constants.h" 28 #include "content/public/common/content_constants.h"
30 #include "content/public/common/content_switches.h" 29 #include "content/public/common/content_switches.h"
31 #include "content/public/renderer/content_renderer_client.h" 30 #include "content/public/renderer/content_renderer_client.h"
32 #include "content/renderer/npapi/webplugin_delegate_proxy.h" 31 #include "content/renderer/npapi/webplugin_delegate_proxy.h"
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // Deferring the call to setBackingIOSurfaceId is an attempt to 568 // Deferring the call to setBackingIOSurfaceId is an attempt to
570 // work around garbage occasionally showing up in the plugin's 569 // work around garbage occasionally showing up in the plugin's
571 // area during live resizing of Core Animation plugins. The 570 // area during live resizing of Core Animation plugins. The
572 // assumption was that by the time this was called, the plugin 571 // assumption was that by the time this was called, the plugin
573 // process would have populated the newly allocated IOSurface. It 572 // process would have populated the newly allocated IOSurface. It
574 // is not 100% clear at this point why any garbage is getting 573 // is not 100% clear at this point why any garbage is getting
575 // through. More investigation is needed. http://crbug.com/105346 574 // through. More investigation is needed. http://crbug.com/105346
576 if (next_io_surface_allocated_) { 575 if (next_io_surface_allocated_) {
577 if (next_io_surface_id_) { 576 if (next_io_surface_id_) {
578 if (!io_surface_layer_.get()) { 577 if (!io_surface_layer_.get()) {
579 io_surface_layer_ = 578 io_surface_layer_ = cc::IOSurfaceLayer::Create();
580 cc::IOSurfaceLayer::Create(cc::LayerSettings());
581 web_layer_.reset(new cc_blink::WebLayerImpl(io_surface_layer_)); 579 web_layer_.reset(new cc_blink::WebLayerImpl(io_surface_layer_));
582 container_->setWebLayer(web_layer_.get()); 580 container_->setWebLayer(web_layer_.get());
583 } 581 }
584 io_surface_layer_->SetIOSurfaceProperties( 582 io_surface_layer_->SetIOSurfaceProperties(
585 next_io_surface_id_, 583 next_io_surface_id_,
586 gfx::Size(next_io_surface_width_, next_io_surface_height_)); 584 gfx::Size(next_io_surface_width_, next_io_surface_height_));
587 } else { 585 } else {
588 container_->setWebLayer(NULL); 586 container_->setWebLayer(NULL);
589 web_layer_.reset(); 587 web_layer_.reset();
590 io_surface_layer_ = NULL; 588 io_surface_layer_ = NULL;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 case PLUGIN_SRC: 742 case PLUGIN_SRC:
745 webframe_->setReferrerForRequest(*request, plugin_url_); 743 webframe_->setReferrerForRequest(*request, plugin_url_);
746 break; 744 break;
747 745
748 default: 746 default:
749 break; 747 break;
750 } 748 }
751 } 749 }
752 750
753 } // namespace content 751 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | content/renderer/pepper/pepper_compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698