diff options
Diffstat (limited to 'webkit')
5 files changed, 8 insertions, 83 deletions
diff --git a/webkit/compositor_bindings/compositor_bindings.gyp b/webkit/compositor_bindings/compositor_bindings.gyp index 9afddfb..4b1fe6f 100644 --- a/webkit/compositor_bindings/compositor_bindings.gyp +++ b/webkit/compositor_bindings/compositor_bindings.gyp @@ -9,8 +9,6 @@ 'web_animation_curve_common.h', 'web_animation_impl.cc', 'web_animation_impl.h', - 'web_compositor_support_software_output_device.cc', - 'web_compositor_support_software_output_device.h', 'web_content_layer_impl.cc', 'web_content_layer_impl.h', 'web_external_texture_layer_impl.cc', diff --git a/webkit/compositor_bindings/web_compositor_support_impl.cc b/webkit/compositor_bindings/web_compositor_support_impl.cc index 382505c..59d6214 100644 --- a/webkit/compositor_bindings/web_compositor_support_impl.cc +++ b/webkit/compositor_bindings/web_compositor_support_impl.cc @@ -7,10 +7,10 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop_proxy.h" #include "cc/output_surface.h" +#include "cc/software_output_device.h" #include "cc/thread_impl.h" #include "cc/transform_operations.h" #include "webkit/compositor_bindings/web_animation_impl.h" -#include "webkit/compositor_bindings/web_compositor_support_software_output_device.h" #include "webkit/compositor_bindings/web_content_layer_impl.h" #include "webkit/compositor_bindings/web_external_texture_layer_impl.h" #include "webkit/compositor_bindings/web_float_animation_curve_impl.h" @@ -87,10 +87,9 @@ WebCompositorSupportImpl::createOutputSurfaceFor3D( WebKit::WebCompositorOutputSurface* WebCompositorSupportImpl::createOutputSurfaceForSoftware() { - scoped_ptr<WebCompositorSupportSoftwareOutputDevice> software_device = - make_scoped_ptr(new WebCompositorSupportSoftwareOutputDevice); - return new cc::OutputSurface( - software_device.PassAs<cc::SoftwareOutputDevice>()); + scoped_ptr<cc::SoftwareOutputDevice> software_device = + make_scoped_ptr(new cc::SoftwareOutputDevice); + return new cc::OutputSurface(software_device.Pass()); } WebLayer* WebCompositorSupportImpl::createLayer() { diff --git a/webkit/compositor_bindings/web_compositor_support_software_output_device.cc b/webkit/compositor_bindings/web_compositor_support_software_output_device.cc deleted file mode 100644 index f4aa34b..0000000 --- a/webkit/compositor_bindings/web_compositor_support_software_output_device.cc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "webkit/compositor_bindings/web_compositor_support_software_output_device.h" - -namespace webkit { - -WebCompositorSupportSoftwareOutputDevice:: - WebCompositorSupportSoftwareOutputDevice() {} - -WebCompositorSupportSoftwareOutputDevice:: - ~WebCompositorSupportSoftwareOutputDevice() {} - -WebKit::WebImage* WebCompositorSupportSoftwareOutputDevice::Lock( - bool for_write) { - DCHECK(device_); - image_ = device_->accessBitmap(for_write); - return &image_; -} - -void WebCompositorSupportSoftwareOutputDevice::Unlock() { image_.reset(); } - -void WebCompositorSupportSoftwareOutputDevice::DidChangeViewportSize( - gfx::Size size) { - if (device_.get() && - size.width() == device_->width() && - size.height() == device_->height()) - return; - - device_ = skia::AdoptRef(new SkDevice( - SkBitmap::kARGB_8888_Config, size.width(), size.height(), true)); -} - -} // namespace webkit diff --git a/webkit/compositor_bindings/web_compositor_support_software_output_device.h b/webkit/compositor_bindings/web_compositor_support_software_output_device.h deleted file mode 100644 index fffc250..0000000 --- a/webkit/compositor_bindings/web_compositor_support_software_output_device.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_SOFTWARE_OUTPUT_DEVICE_H_ -#define WEBKIT_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_SOFTWARE_OUTPUT_DEVICE_H_ - -#include "base/logging.h" -#include "cc/software_output_device.h" -#include "skia/ext/refptr.h" -#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h" -#include "third_party/skia/include/core/SkDevice.h" -#include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" - -namespace webkit { - -class WebCompositorSupportSoftwareOutputDevice : - public cc::SoftwareOutputDevice { - public: - WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebCompositorSupportSoftwareOutputDevice(); - virtual ~WebCompositorSupportSoftwareOutputDevice(); - - virtual WebKit::WebImage* Lock(bool for_write) OVERRIDE; - virtual void Unlock() OVERRIDE; - - virtual void DidChangeViewportSize(gfx::Size size) OVERRIDE; - - private: - skia::RefPtr<SkDevice> device_; - WebKit::WebImage image_; -}; - -} // namespace webkit - -#endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_SOFTWARE_OUTPUT_DEVICE_H_ diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc b/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc index ecfe511..1e7f38e 100644 --- a/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc +++ b/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc @@ -13,6 +13,7 @@ #include "cc/layer.h" #include "cc/layer_tree_host.h" #include "cc/output_surface.h" +#include "cc/software_output_device.h" #include "cc/switches.h" #include "cc/thread.h" #include "cc/thread_impl.h" @@ -24,7 +25,6 @@ #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" #include "webkit/compositor_bindings/web_compositor_support_impl.h" -#include "webkit/compositor_bindings/web_compositor_support_software_output_device.h" #include "webkit/compositor_bindings/web_layer_impl.h" #include "webkit/compositor_bindings/web_rendering_stats_impl.h" #include "webkit/compositor_bindings/web_to_ccinput_handler_adapter.h" @@ -184,11 +184,9 @@ WebLayerTreeViewImplForTesting::createOutputSurface() { break; } case webkit_support::SOFTWARE_CONTEXT: { - using webkit::WebCompositorSupportSoftwareOutputDevice; - scoped_ptr<WebCompositorSupportSoftwareOutputDevice> software_device = - make_scoped_ptr(new WebCompositorSupportSoftwareOutputDevice); - surface.reset(new cc::OutputSurface( - software_device.PassAs<cc::SoftwareOutputDevice>())); + scoped_ptr<cc::SoftwareOutputDevice> software_device = + make_scoped_ptr(new cc::SoftwareOutputDevice); + surface.reset(new cc::OutputSurface(software_device.Pass())); break; } case webkit_support::MESA_CONTEXT: { |