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

Side by Side Diff: content/renderer/child_frame_compositing_helper.cc

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/DEPS ('k') | content/renderer/compositor_bindings/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/child_frame_compositing_helper.h" 5 #include "content/renderer/child_frame_compositing_helper.h"
6 6
7 #include "cc/blink/web_layer_impl.h"
7 #include "cc/layers/delegated_frame_provider.h" 8 #include "cc/layers/delegated_frame_provider.h"
8 #include "cc/layers/delegated_frame_resource_collection.h" 9 #include "cc/layers/delegated_frame_resource_collection.h"
9 #include "cc/layers/delegated_renderer_layer.h" 10 #include "cc/layers/delegated_renderer_layer.h"
10 #include "cc/layers/solid_color_layer.h" 11 #include "cc/layers/solid_color_layer.h"
11 #include "cc/layers/texture_layer.h" 12 #include "cc/layers/texture_layer.h"
12 #include "cc/output/context_provider.h" 13 #include "cc/output/context_provider.h"
13 #include "cc/output/copy_output_request.h" 14 #include "cc/output/copy_output_request.h"
14 #include "cc/output/copy_output_result.h" 15 #include "cc/output/copy_output_result.h"
15 #include "cc/resources/single_release_callback.h" 16 #include "cc/resources/single_release_callback.h"
16 #include "content/common/browser_plugin/browser_plugin_messages.h" 17 #include "content/common/browser_plugin/browser_plugin_messages.h"
17 #include "content/common/frame_messages.h" 18 #include "content/common/frame_messages.h"
18 #include "content/common/gpu/client/context_provider_command_buffer.h" 19 #include "content/common/gpu/client/context_provider_command_buffer.h"
19 #include "content/renderer/browser_plugin/browser_plugin.h" 20 #include "content/renderer/browser_plugin/browser_plugin.h"
20 #include "content/renderer/browser_plugin/browser_plugin_manager.h" 21 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
21 #include "content/renderer/compositor_bindings/web_layer_impl.h"
22 #include "content/renderer/render_frame_impl.h" 22 #include "content/renderer/render_frame_impl.h"
23 #include "content/renderer/render_frame_proxy.h" 23 #include "content/renderer/render_frame_proxy.h"
24 #include "content/renderer/render_thread_impl.h" 24 #include "content/renderer/render_thread_impl.h"
25 #include "skia/ext/image_operations.h" 25 #include "skia/ext/image_operations.h"
26 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 26 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
27 #include "third_party/WebKit/public/web/WebFrame.h" 27 #include "third_party/WebKit/public/web/WebFrame.h"
28 #include "third_party/WebKit/public/web/WebPluginContainer.h" 28 #include "third_party/WebKit/public/web/WebPluginContainer.h"
29 #include "third_party/khronos/GLES2/gl2.h" 29 #include "third_party/khronos/GLES2/gl2.h"
30 #include "ui/gfx/size_conversions.h" 30 #include "ui/gfx/size_conversions.h"
31 #include "ui/gfx/skia_util.h" 31 #include "ui/gfx/skia_util.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 ack_pending_ = false; 181 ack_pending_ = false;
182 } 182 }
183 183
184 void ChildFrameCompositingHelper::EnableCompositing(bool enable) { 184 void ChildFrameCompositingHelper::EnableCompositing(bool enable) {
185 if (enable && !background_layer_.get()) { 185 if (enable && !background_layer_.get()) {
186 background_layer_ = cc::SolidColorLayer::Create(); 186 background_layer_ = cc::SolidColorLayer::Create();
187 background_layer_->SetMasksToBounds(true); 187 background_layer_->SetMasksToBounds(true);
188 background_layer_->SetBackgroundColor( 188 background_layer_->SetBackgroundColor(
189 SkColorSetARGBInline(255, 255, 255, 255)); 189 SkColorSetARGBInline(255, 255, 255, 255));
190 web_layer_.reset(new WebLayerImpl(background_layer_)); 190 web_layer_.reset(new cc_blink::WebLayerImpl(background_layer_));
191 } 191 }
192 192
193 if (GetContainer()) { 193 if (GetContainer()) {
194 GetContainer()->setWebLayer(enable ? web_layer_.get() : NULL); 194 GetContainer()->setWebLayer(enable ? web_layer_.get() : NULL);
195 } else if (frame_) { 195 } else if (frame_) {
196 frame_->setRemoteWebLayer(enable ? web_layer_.get() : NULL); 196 frame_->setRemoteWebLayer(enable ? web_layer_.get() : NULL);
197 } 197 }
198 } 198 }
199 199
200 void ChildFrameCompositingHelper::CheckSizeAndAdjustLayerProperties( 200 void ChildFrameCompositingHelper::CheckSizeAndAdjustLayerProperties(
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 dest_size.height()); 558 dest_size.height());
559 } 559 }
560 if (GetBrowserPluginManager()) { 560 if (GetBrowserPluginManager()) {
561 GetBrowserPluginManager()->Send( 561 GetBrowserPluginManager()->Send(
562 new BrowserPluginHostMsg_CopyFromCompositingSurfaceAck( 562 new BrowserPluginHostMsg_CopyFromCompositingSurfaceAck(
563 host_routing_id_, GetInstanceID(), request_id, resized_bitmap)); 563 host_routing_id_, GetInstanceID(), request_id, resized_bitmap));
564 } 564 }
565 } 565 }
566 566
567 } // namespace content 567 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/DEPS ('k') | content/renderer/compositor_bindings/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698