diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 10:17:34 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 10:17:34 +0000 |
commit | 7aba66652cf8fe7e131d4638d00b574fc05526ee (patch) | |
tree | 0a1012dc37172ff9b276679c55d77c38c111f37a /content | |
parent | b2720f159750fd54728b7ec0b9da8baed9ec4a83 (diff) | |
download | chromium_src-7aba66652cf8fe7e131d4638d00b574fc05526ee.zip chromium_src-7aba66652cf8fe7e131d4638d00b574fc05526ee.tar.gz chromium_src-7aba66652cf8fe7e131d4638d00b574fc05526ee.tar.bz2 |
cc: Chromify Layer and LayerImpl classes.
Style-only change. Bring the Layer and LayerImpl classes
into the Chromium style.
R=enne,piman,jamesr
TBR=joth
Review URL: https://chromiumcodereview.appspot.com/12774006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
6 files changed, 25 insertions, 25 deletions
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index c882c2d..2463906 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc @@ -163,7 +163,7 @@ ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj, ui::WindowAndroid* window_android) : java_ref_(env, obj), web_contents_(static_cast<WebContentsImpl*>(web_contents)), - root_layer_(cc::Layer::create()), + root_layer_(cc::Layer::Create()), tab_crashed_(false), input_events_delivered_at_vsync_(input_events_delivered_at_vsync), renderer_frame_pending_(false), @@ -644,11 +644,11 @@ gfx::Size ContentViewCoreImpl::GetViewportSizeDip() const { } void ContentViewCoreImpl::AttachLayer(scoped_refptr<cc::Layer> layer) { - root_layer_->addChild(layer); + root_layer_->AddChild(layer); } void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) { - layer->removeFromParent(); + layer->RemoveFromParent(); } void ContentViewCoreImpl::DidProduceRendererFrame() { diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc index 8127b19..753f20d 100644 --- a/content/browser/renderer_host/compositor_impl_android.cc +++ b/content/browser/renderer_host/compositor_impl_android.cc @@ -115,7 +115,7 @@ jobject CompositorImpl::GetSurface(int surface_id) { } CompositorImpl::CompositorImpl(Compositor::Client* client) - : root_layer_(cc::Layer::create()), + : root_layer_(cc::Layer::Create()), has_transparent_background_(false), window_(NULL), surface_id_(0), @@ -133,8 +133,8 @@ void CompositorImpl::Composite() { } void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) { - root_layer_->removeAllChildren(); - root_layer_->addChild(root_layer); + root_layer_->RemoveAllChildren(); + root_layer_->AddChild(root_layer); } void CompositorImpl::SetWindowSurface(ANativeWindow* window) { @@ -222,7 +222,7 @@ void CompositorImpl::SetWindowBounds(const gfx::Size& size) { size_ = size; if (host_) host_->setViewportSize(size, size); - root_layer_->setBounds(size); + root_layer_->SetBounds(size); } void CompositorImpl::SetHasTransparentBackground(bool flag) { diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index c938477..869896e 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc @@ -82,12 +82,12 @@ RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid( surface_texture_transport_.reset(new SurfaceTextureTransportClient()); layer_ = surface_texture_transport_->Initialize(); } else { - texture_layer_ = cc::TextureLayer::create(0); + texture_layer_ = cc::TextureLayer::Create(NULL); layer_ = texture_layer_; } - layer_->setContentsOpaque(true); - layer_->setIsDrawable(true); + layer_->SetContentsOpaque(true); + layer_->SetIsDrawable(true); host_->SetView(this); SetContentViewCore(content_view_core); @@ -556,8 +556,8 @@ void RenderWidgetHostViewAndroid::BuffersSwapped( if (content_view_core_) content_view_core_->DidProduceRendererFrame(); - texture_layer_->setNeedsDisplay(); - texture_layer_->setBounds(size); + texture_layer_->SetNeedsDisplay(); + texture_layer_->SetBounds(size); texture_size_in_layer_ = size; current_mailbox_ = mailbox; ack_callback.Run(); diff --git a/content/browser/renderer_host/surface_texture_transport_client_android.cc b/content/browser/renderer_host/surface_texture_transport_client_android.cc index 0e89c5d..72601bc 100644 --- a/content/browser/renderer_host/surface_texture_transport_client_android.cc +++ b/content/browser/renderer_host/surface_texture_transport_client_android.cc @@ -42,7 +42,7 @@ SurfaceTextureTransportClient::~SurfaceTextureTransportClient() { scoped_refptr<cc::Layer> SurfaceTextureTransportClient::Initialize() { // Use a SurfaceTexture to stream frames to the UI thread. - video_layer_ = cc::VideoLayer::create(this); + video_layer_ = cc::VideoLayer::Create(this); surface_texture_ = new SurfaceTextureBridge(0); surface_texture_->SetFrameAvailableCallback( @@ -67,7 +67,7 @@ SurfaceTextureTransportClient::GetCompositingSurface(int surface_id) { void SurfaceTextureTransportClient::SetSize(const gfx::Size& size) { surface_texture_->SetDefaultBufferSize(size.width(), size.height()); - video_layer_->setBounds(size); + video_layer_->SetBounds(size); video_frame_ = NULL; } @@ -101,7 +101,7 @@ void SurfaceTextureTransportClient::PutCurrentFrame( } void SurfaceTextureTransportClient::OnSurfaceTextureFrameAvailable() { - video_layer_->setNeedsDisplay(); + video_layer_->SetNeedsDisplay(); } } // namespace content diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc index 88c3d5c..2e41493 100644 --- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc +++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc @@ -40,15 +40,15 @@ BrowserPluginCompositingHelper::~BrowserPluginCompositingHelper() { void BrowserPluginCompositingHelper::EnableCompositing(bool enable) { if (enable && !texture_layer_) { - texture_layer_ = cc::TextureLayer::createForMailbox(); - texture_layer_->setIsDrawable(true); - texture_layer_->setContentsOpaque(true); + texture_layer_ = cc::TextureLayer::CreateForMailbox(); + texture_layer_->SetIsDrawable(true); + texture_layer_->SetContentsOpaque(true); background_layer_ = cc::SolidColorLayer::Create(); - background_layer_->setMasksToBounds(true); - background_layer_->setBackgroundColor( + background_layer_->SetMasksToBounds(true); + background_layer_->SetBackgroundColor( SkColorSetARGBInline(255, 255, 255, 255)); - background_layer_->addChild(texture_layer_); + background_layer_->AddChild(texture_layer_); web_layer_.reset(new WebKit::WebLayerImpl(background_layer_)); } @@ -200,7 +200,7 @@ void BrowserPluginCompositingHelper::OnBuffersSwapped( // it by the device scale factor. gfx::Size device_scale_adjusted_size = gfx::ToFlooredSize( gfx::ScaleSize(buffer_size_, 1.0f / device_scale_factor)); - texture_layer_->setBounds(device_scale_adjusted_size); + texture_layer_->SetBounds(device_scale_adjusted_size); } bool current_mailbox_valid = !mailbox_name.empty(); @@ -220,13 +220,13 @@ void BrowserPluginCompositingHelper::OnBuffersSwapped( } texture_layer_->setTextureMailbox(cc::TextureMailbox(mailbox_name, callback)); - texture_layer_->setNeedsDisplay(); + texture_layer_->SetNeedsDisplay(); last_mailbox_valid_ = current_mailbox_valid; } void BrowserPluginCompositingHelper::UpdateVisibility(bool visible) { if (texture_layer_) - texture_layer_->setIsDrawable(visible); + texture_layer_->SetIsDrawable(visible); } } // namespace content diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index 0573a73..de7b6f8 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -395,7 +395,7 @@ void RenderWidgetCompositor::didStopFlinging() { void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) { cc::Layer* cc_layer = static_cast<WebKit::WebLayerImpl*>(layer)->layer(); - cc_layer->layerAnimationController()->SetAnimationRegistrar( + cc_layer->layer_animation_controller()->SetAnimationRegistrar( layer_tree_host_->animationRegistrar()); } |