diff options
author | dnicoara@chromium.org <dnicoara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 23:44:03 +0000 |
---|---|---|
committer | dnicoara@chromium.org <dnicoara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 23:44:03 +0000 |
commit | 03268a47c6c0d8afee14f3fadac67e363d330a96 (patch) | |
tree | 65fadb8bf67ac5d8874383b0e3a01d3f1d4bc5dd | |
parent | 34f933929e45d28494d20788fb3950f68cb2513d (diff) | |
download | chromium_src-03268a47c6c0d8afee14f3fadac67e363d330a96.zip chromium_src-03268a47c6c0d8afee14f3fadac67e363d330a96.tar.gz chromium_src-03268a47c6c0d8afee14f3fadac67e363d330a96.tar.bz2 |
[Ozone] Removing Stub SFO implementation & CreateTestHelper from SFO
Given we now use the OzonePlatform to initialize SFO and we already have a test
implementation(the file backend), the Stub implementation isn't required. After
the removal the unittests will default to using the file backend.
This change also fixes the recent brakage of aura_unittests since the Stub SFO
returns 0 (kNullAcceleratedWidget) for a widget, which triggers a DCHECK
failure in WindowTreeHost::DestroyCompositor.
BUG=
Review URL: https://codereview.chromium.org/131493005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245377 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/aura/test/aura_test_helper.cc | 8 | ||||
-rw-r--r-- | ui/aura/test/aura_test_helper.h | 8 | ||||
-rw-r--r-- | ui/gfx/ozone/surface_factory_ozone.cc | 33 | ||||
-rw-r--r-- | ui/gfx/ozone/surface_factory_ozone.h | 3 |
4 files changed, 0 insertions, 52 deletions
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc index dc03ded..a101eda 100644 --- a/ui/aura/test/aura_test_helper.cc +++ b/ui/aura/test/aura_test_helper.cc @@ -30,10 +30,6 @@ #include "ui/base/x/x11_util.h" #endif -#if defined(USE_OZONE) -#include "ui/gfx/ozone/surface_factory_ozone.h" -#endif - namespace aura { namespace test { @@ -49,10 +45,6 @@ AuraTestHelper::AuraTestHelper(base::MessageLoopForUI* message_loop) #if defined(USE_X11) test::SetUseOverrideRedirectWindowByDefault(true); #endif -#if defined(USE_OZONE) - surface_factory_.reset(gfx::SurfaceFactoryOzone::CreateTestHelper()); - gfx::SurfaceFactoryOzone::SetInstance(surface_factory_.get()); -#endif } AuraTestHelper::~AuraTestHelper() { diff --git a/ui/aura/test/aura_test_helper.h b/ui/aura/test/aura_test_helper.h index 1f201a6..6b4215f 100644 --- a/ui/aura/test/aura_test_helper.h +++ b/ui/aura/test/aura_test_helper.h @@ -13,10 +13,6 @@ namespace base { class MessageLoopForUI; } -namespace gfx { -class SurfaceFactoryOzone; -} - namespace ui { class InputMethod; class ScopedAnimationDurationScaleMode; @@ -69,10 +65,6 @@ class AuraTestHelper { scoped_ptr<TestScreen> test_screen_; scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; -#if defined(USE_OZONE) - scoped_ptr<gfx::SurfaceFactoryOzone> surface_factory_; -#endif - DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); }; diff --git a/ui/gfx/ozone/surface_factory_ozone.cc b/ui/gfx/ozone/surface_factory_ozone.cc index a99c3af..97e28bf 100644 --- a/ui/gfx/ozone/surface_factory_ozone.cc +++ b/ui/gfx/ozone/surface_factory_ozone.cc @@ -14,34 +14,6 @@ namespace gfx { // static SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL; -class SurfaceFactoryOzoneStub : public SurfaceFactoryOzone { - public: - SurfaceFactoryOzoneStub() {} - virtual ~SurfaceFactoryOzoneStub() {} - - virtual HardwareState InitializeHardware() OVERRIDE { return INITIALIZED; } - virtual void ShutdownHardware() OVERRIDE {} - virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE { return 0; } - virtual gfx::AcceleratedWidget RealizeAcceleratedWidget( - gfx::AcceleratedWidget w) OVERRIDE { - return 0; - } - virtual bool LoadEGLGLES2Bindings( - AddGLLibraryCallback add_gl_library, - SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE { - return true; - } - virtual bool AttemptToResizeAcceleratedWidget( - gfx::AcceleratedWidget w, - const gfx::Rect& bounds) OVERRIDE { - return false; - } - virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider( - gfx::AcceleratedWidget w) OVERRIDE { - return scoped_ptr<VSyncProvider>(); - } -}; - SurfaceFactoryOzone::SurfaceFactoryOzone() { } @@ -85,9 +57,4 @@ const int32* SurfaceFactoryOzone::GetEGLSurfaceProperties( return desired_attributes; } -// static -SurfaceFactoryOzone* SurfaceFactoryOzone::CreateTestHelper() { - return new SurfaceFactoryOzoneStub; -} - } // namespace gfx diff --git a/ui/gfx/ozone/surface_factory_ozone.h b/ui/gfx/ozone/surface_factory_ozone.h index 494c5be..fde29c2 100644 --- a/ui/gfx/ozone/surface_factory_ozone.h +++ b/ui/gfx/ozone/surface_factory_ozone.h @@ -137,9 +137,6 @@ class GFX_EXPORT SurfaceFactoryOzone { // caller. desired_list contains list of desired EGL properties and values. virtual const int32* GetEGLSurfaceProperties(const int32* desired_list); - // Create a default SufaceFactoryOzone implementation useful for tests. - static SurfaceFactoryOzone* CreateTestHelper(); - private: static SurfaceFactoryOzone* impl_; // not owned }; |