diff options
author | spang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 20:10:44 +0000 |
---|---|---|
committer | spang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 20:10:44 +0000 |
commit | c64a9d2756d78931a1c1c0eb1b6e020ea2aeb93e (patch) | |
tree | 1763880008fe3add2cf2f8b787decf3a816e4c0c | |
parent | eb1ce5120170d75dd6cd7ac7dd47ad5250d2906c (diff) | |
download | chromium_src-c64a9d2756d78931a1c1c0eb1b6e020ea2aeb93e.zip chromium_src-c64a9d2756d78931a1c1c0eb1b6e020ea2aeb93e.tar.gz chromium_src-c64a9d2756d78931a1c1c0eb1b6e020ea2aeb93e.tar.bz2 |
Support removal of DRI platform
All ozone configurations currently build DRI support, and therefore
have a dependency on the libdrm system library. This is not needed
except when ozone_platform_dri is enabled.
This allows us to drop the link to libdrm when it is not needed.
Review URL: https://codereview.chromium.org/62953003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233671 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 3 | ||||
-rw-r--r-- | build/filename_rules.gypi | 5 | ||||
-rw-r--r-- | ui/gfx/gfx.gyp | 22 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_skbitmap.cc (renamed from ui/gfx/ozone/impl/dri_skbitmap.cc) | 2 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_skbitmap.h (renamed from ui/gfx/ozone/impl/dri_skbitmap.h) | 6 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_surface.cc (renamed from ui/gfx/ozone/impl/dri_surface.cc) | 6 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_surface.h (renamed from ui/gfx/ozone/impl/dri_surface.h) | 6 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_surface_factory.cc (renamed from ui/gfx/ozone/impl/dri_surface_factory.cc) | 10 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_surface_factory.h (renamed from ui/gfx/ozone/impl/dri_surface_factory.h) | 6 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_surface_factory_unittest.cc (renamed from ui/gfx/ozone/impl/dri_surface_factory_unittest.cc) | 10 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_surface_unittest.cc (renamed from ui/gfx/ozone/impl/dri_surface_unittest.cc) | 6 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_wrapper.cc (renamed from ui/gfx/ozone/impl/dri_wrapper.cc) | 2 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/dri_wrapper.h (renamed from ui/gfx/ozone/impl/dri_wrapper.h) | 6 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/hardware_display_controller.cc (renamed from ui/gfx/ozone/impl/hardware_display_controller.cc) | 8 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/hardware_display_controller.h (renamed from ui/gfx/ozone/impl/hardware_display_controller.h) | 8 | ||||
-rw-r--r-- | ui/gfx/ozone/dri/hardware_display_controller_unittest.cc (renamed from ui/gfx/ozone/impl/hardware_display_controller_unittest.cc) | 8 | ||||
-rw-r--r-- | ui/ozone/platform/dri/ozone_platform_dri.h | 2 | ||||
-rw-r--r-- | ui/ui_unittests.gyp | 6 |
18 files changed, 65 insertions, 57 deletions
diff --git a/build/common.gypi b/build/common.gypi index c69e342..4f1d3f5 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1802,6 +1802,9 @@ # Enable built-in ozone platforms if ozone is enabled. 'ozone_platform_dri%': 1, 'ozone_platform_test%': 1, + }, { # use_ozone==0 + 'ozone_platform_dri%': 0, + 'ozone_platform_test%': 0, }], ], diff --git a/build/filename_rules.gypi b/build/filename_rules.gypi index 1b176bd..584c4b3 100644 --- a/build/filename_rules.gypi +++ b/build/filename_rules.gypi @@ -110,6 +110,11 @@ ['exclude', '(^|/)evdev/'], ] }], + ['<(ozone_platform_dri)==0 or >(nacl_untrusted_build)==1', { + 'sources/': [ ['exclude', '_dri(_browsertest|_unittest)?\\.(h|cc)$'], + ['exclude', '(^|/)dri/'], + ] + }], ['<(use_pango)==0', { 'sources/': [ ['exclude', '(^|_)pango(_util|_browsertest|_unittest)?\\.(h|cc)$'], ], }], diff --git a/ui/gfx/gfx.gyp b/ui/gfx/gfx.gyp index 6b5403c..ccc1700 100644 --- a/ui/gfx/gfx.gyp +++ b/ui/gfx/gfx.gyp @@ -144,18 +144,18 @@ 'matrix3_f.cc', 'matrix3_f.h', 'native_widget_types.h', - 'ozone/impl/dri_skbitmap.cc', - 'ozone/impl/dri_skbitmap.h', - 'ozone/impl/dri_surface.cc', - 'ozone/impl/dri_surface.h', - 'ozone/impl/dri_surface_factory.cc', - 'ozone/impl/dri_surface_factory.h', - 'ozone/impl/dri_wrapper.cc', - 'ozone/impl/dri_wrapper.h', + 'ozone/dri/dri_skbitmap.cc', + 'ozone/dri/dri_skbitmap.h', + 'ozone/dri/dri_surface.cc', + 'ozone/dri/dri_surface.h', + 'ozone/dri/dri_surface_factory.cc', + 'ozone/dri/dri_surface_factory.h', + 'ozone/dri/dri_wrapper.cc', + 'ozone/dri/dri_wrapper.h', + 'ozone/dri/hardware_display_controller.cc', + 'ozone/dri/hardware_display_controller.h', 'ozone/impl/file_surface_factory.cc', 'ozone/impl/file_surface_factory.h', - 'ozone/impl/hardware_display_controller.cc', - 'ozone/impl/hardware_display_controller.h', 'ozone/surface_factory_ozone.cc', 'ozone/surface_factory_ozone.h', 'pango_util.cc', @@ -374,7 +374,7 @@ '<(DEPTH)/build/linux/system.gyp:pangocairo', ], }], - ['use_ozone==1', { + ['ozone_platform_dri==1', { 'dependencies': [ '<(DEPTH)/build/linux/system.gyp:dridrm', ], diff --git a/ui/gfx/ozone/impl/dri_skbitmap.cc b/ui/gfx/ozone/dri/dri_skbitmap.cc index b965c73..dcc16ca 100644 --- a/ui/gfx/ozone/impl/dri_skbitmap.cc +++ b/ui/gfx/ozone/dri/dri_skbitmap.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/gfx/ozone/impl/dri_skbitmap.h" +#include "ui/gfx/ozone/dri/dri_skbitmap.h" #include <errno.h> #include <sys/mman.h> diff --git a/ui/gfx/ozone/impl/dri_skbitmap.h b/ui/gfx/ozone/dri/dri_skbitmap.h index 5e43d89..9a46b65 100644 --- a/ui/gfx/ozone/impl/dri_skbitmap.h +++ b/ui/gfx/ozone/dri/dri_skbitmap.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_GFX_OZONE_IMPL_DRI_SKBITMAP_H_ -#define UI_GFX_OZONE_IMPL_DRI_SKBITMAP_H_ +#ifndef UI_GFX_OZONE_DRI_DRI_SKBITMAP_H_ +#define UI_GFX_OZONE_DRI_DRI_SKBITMAP_H_ #include "base/basictypes.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -53,4 +53,4 @@ class DriSkBitmap : public SkBitmap { } // namespace gfx -#endif // UI_GFX_OZONE_IMPL_DRI_SKBITMAP_H_ +#endif // UI_GFX_OZONE_DRI_DRI_SKBITMAP_H_ diff --git a/ui/gfx/ozone/impl/dri_surface.cc b/ui/gfx/ozone/dri/dri_surface.cc index 9fd25aa..c9b6af4 100644 --- a/ui/gfx/ozone/impl/dri_surface.cc +++ b/ui/gfx/ozone/dri/dri_surface.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/gfx/ozone/impl/dri_surface.h" +#include "ui/gfx/ozone/dri/dri_surface.h" #include <errno.h> #include <sys/mman.h> @@ -13,8 +13,8 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkBitmapDevice.h" #include "third_party/skia/include/core/SkCanvas.h" -#include "ui/gfx/ozone/impl/dri_skbitmap.h" -#include "ui/gfx/ozone/impl/hardware_display_controller.h" +#include "ui/gfx/ozone/dri/dri_skbitmap.h" +#include "ui/gfx/ozone/dri/hardware_display_controller.h" #include "ui/gfx/skia_util.h" namespace gfx { diff --git a/ui/gfx/ozone/impl/dri_surface.h b/ui/gfx/ozone/dri/dri_surface.h index 7174e89..3767f56 100644 --- a/ui/gfx/ozone/impl/dri_surface.h +++ b/ui/gfx/ozone/dri/dri_surface.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_GFX_OZONE_IMPL_DRI_SURFACE_H_ -#define UI_GFX_OZONE_IMPL_DRI_SURFACE_H_ +#ifndef UI_GFX_OZONE_DRI_DRI_SURFACE_H_ +#define UI_GFX_OZONE_DRI_DRI_SURFACE_H_ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" @@ -164,4 +164,4 @@ class DriSurface { } // namespace gfx -#endif // UI_GFX_OZONE_IMPL_DRI_SURFACE_H_ +#endif // UI_GFX_OZONE_DRI_DRI_SURFACE_H_ diff --git a/ui/gfx/ozone/impl/dri_surface_factory.cc b/ui/gfx/ozone/dri/dri_surface_factory.cc index 41a4215..7f7b350 100644 --- a/ui/gfx/ozone/impl/dri_surface_factory.cc +++ b/ui/gfx/ozone/dri/dri_surface_factory.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/gfx/ozone/impl/dri_surface_factory.h" +#include "ui/gfx/ozone/dri/dri_surface_factory.h" #include <drm.h> #include <errno.h> @@ -12,10 +12,10 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkDevice.h" #include "ui/gfx/native_widget_types.h" -#include "ui/gfx/ozone/impl/dri_skbitmap.h" -#include "ui/gfx/ozone/impl/dri_surface.h" -#include "ui/gfx/ozone/impl/dri_wrapper.h" -#include "ui/gfx/ozone/impl/hardware_display_controller.h" +#include "ui/gfx/ozone/dri/dri_skbitmap.h" +#include "ui/gfx/ozone/dri/dri_surface.h" +#include "ui/gfx/ozone/dri/dri_wrapper.h" +#include "ui/gfx/ozone/dri/hardware_display_controller.h" namespace gfx { diff --git a/ui/gfx/ozone/impl/dri_surface_factory.h b/ui/gfx/ozone/dri/dri_surface_factory.h index 08e2792..e31eebb 100644 --- a/ui/gfx/ozone/impl/dri_surface_factory.h +++ b/ui/gfx/ozone/dri/dri_surface_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_GFX_OZONE_IMPL_DRI_SURFACE_FACTORY_H_ -#define UI_GFX_OZONE_IMPL_DRI_SURFACE_FACTORY_H_ +#ifndef UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_ +#define UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_ #include "base/memory/scoped_ptr.h" #include "ui/gfx/ozone/surface_factory_ozone.h" @@ -73,4 +73,4 @@ class GFX_EXPORT DriSurfaceFactory : public SurfaceFactoryOzone { } // namespace gfx -#endif // UI_GFX_OZONE_IMPL_DRI_SURFACE_FACTORY_H_ +#endif // UI_GFX_OZONE_DRI_DRI_SURFACE_FACTORY_H_ diff --git a/ui/gfx/ozone/impl/dri_surface_factory_unittest.cc b/ui/gfx/ozone/dri/dri_surface_factory_unittest.cc index 77593e3..2e70f64 100644 --- a/ui/gfx/ozone/impl/dri_surface_factory_unittest.cc +++ b/ui/gfx/ozone/dri/dri_surface_factory_unittest.cc @@ -5,11 +5,11 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "testing/gtest/include/gtest/gtest.h" -#include "ui/gfx/ozone/impl/dri_skbitmap.h" -#include "ui/gfx/ozone/impl/dri_surface.h" -#include "ui/gfx/ozone/impl/dri_surface_factory.h" -#include "ui/gfx/ozone/impl/dri_wrapper.h" -#include "ui/gfx/ozone/impl/hardware_display_controller.h" +#include "ui/gfx/ozone/dri/dri_skbitmap.h" +#include "ui/gfx/ozone/dri/dri_surface.h" +#include "ui/gfx/ozone/dri/dri_surface_factory.h" +#include "ui/gfx/ozone/dri/dri_wrapper.h" +#include "ui/gfx/ozone/dri/hardware_display_controller.h" #include "ui/gfx/ozone/surface_factory_ozone.h" namespace { diff --git a/ui/gfx/ozone/impl/dri_surface_unittest.cc b/ui/gfx/ozone/dri/dri_surface_unittest.cc index 7684ed6..7546591 100644 --- a/ui/gfx/ozone/impl/dri_surface_unittest.cc +++ b/ui/gfx/ozone/dri/dri_surface_unittest.cc @@ -6,9 +6,9 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkDevice.h" -#include "ui/gfx/ozone/impl/dri_skbitmap.h" -#include "ui/gfx/ozone/impl/dri_surface.h" -#include "ui/gfx/ozone/impl/hardware_display_controller.h" +#include "ui/gfx/ozone/dri/dri_skbitmap.h" +#include "ui/gfx/ozone/dri/dri_surface.h" +#include "ui/gfx/ozone/dri/hardware_display_controller.h" namespace { diff --git a/ui/gfx/ozone/impl/dri_wrapper.cc b/ui/gfx/ozone/dri/dri_wrapper.cc index 4b6ee13..2b1104b 100644 --- a/ui/gfx/ozone/impl/dri_wrapper.cc +++ b/ui/gfx/ozone/dri/dri_wrapper.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/gfx/ozone/impl/dri_wrapper.h" +#include "ui/gfx/ozone/dri/dri_wrapper.h" #include <fcntl.h> #include <unistd.h> diff --git a/ui/gfx/ozone/impl/dri_wrapper.h b/ui/gfx/ozone/dri/dri_wrapper.h index e56dd44..1079cb6 100644 --- a/ui/gfx/ozone/impl/dri_wrapper.h +++ b/ui/gfx/ozone/dri/dri_wrapper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_GFX_OZONE_IMPL_DRI_WRAPPER_H_ -#define UI_GFX_OZONE_IMPL_DRI_WRAPPER_H_ +#ifndef UI_GFX_OZONE_DRI_DRI_WRAPPER_H_ +#define UI_GFX_OZONE_DRI_DRI_WRAPPER_H_ #include <stdint.h> @@ -82,4 +82,4 @@ class DriWrapper { } // namespace gfx -#endif // UI_GFX_OZONE_IMPL_DRI_WRAPPER_H_ +#endif // UI_GFX_OZONE_DRI_DRI_WRAPPER_H_ diff --git a/ui/gfx/ozone/impl/hardware_display_controller.cc b/ui/gfx/ozone/dri/hardware_display_controller.cc index edd4b38..40a6aab 100644 --- a/ui/gfx/ozone/impl/hardware_display_controller.cc +++ b/ui/gfx/ozone/dri/hardware_display_controller.cc @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/gfx/ozone/impl/hardware_display_controller.h" +#include "ui/gfx/ozone/dri/hardware_display_controller.h" #include <errno.h> #include <string.h> #include "base/basictypes.h" #include "base/logging.h" -#include "ui/gfx/ozone/impl/dri_skbitmap.h" -#include "ui/gfx/ozone/impl/dri_surface.h" -#include "ui/gfx/ozone/impl/dri_wrapper.h" +#include "ui/gfx/ozone/dri/dri_skbitmap.h" +#include "ui/gfx/ozone/dri/dri_surface.h" +#include "ui/gfx/ozone/dri/dri_wrapper.h" namespace gfx { diff --git a/ui/gfx/ozone/impl/hardware_display_controller.h b/ui/gfx/ozone/dri/hardware_display_controller.h index cb7d623..493c16e 100644 --- a/ui/gfx/ozone/impl/hardware_display_controller.h +++ b/ui/gfx/ozone/dri/hardware_display_controller.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_H_ -#define UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_H_ +#ifndef UI_GFX_OZONE_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ +#define UI_GFX_OZONE_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ #include <stddef.h> #include <stdint.h> @@ -12,7 +12,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "ui/gfx/ozone/impl/dri_wrapper.h" +#include "ui/gfx/ozone/dri/dri_wrapper.h" namespace gfx { @@ -170,4 +170,4 @@ class HardwareDisplayController { } // namespace gfx -#endif // UI_GFX_OZONE_IMPL_HARDWARE_DISPLAY_CONTROLLER_H_ +#endif // UI_GFX_OZONE_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ diff --git a/ui/gfx/ozone/impl/hardware_display_controller_unittest.cc b/ui/gfx/ozone/dri/hardware_display_controller_unittest.cc index d0be7e6b..3806b5a 100644 --- a/ui/gfx/ozone/impl/hardware_display_controller_unittest.cc +++ b/ui/gfx/ozone/dri/hardware_display_controller_unittest.cc @@ -3,10 +3,10 @@ // found in the LICENSE file. #include "testing/gtest/include/gtest/gtest.h" -#include "ui/gfx/ozone/impl/dri_skbitmap.h" -#include "ui/gfx/ozone/impl/dri_surface.h" -#include "ui/gfx/ozone/impl/dri_wrapper.h" -#include "ui/gfx/ozone/impl/hardware_display_controller.h" +#include "ui/gfx/ozone/dri/dri_skbitmap.h" +#include "ui/gfx/ozone/dri/dri_surface.h" +#include "ui/gfx/ozone/dri/dri_wrapper.h" +#include "ui/gfx/ozone/dri/hardware_display_controller.h" namespace { diff --git a/ui/ozone/platform/dri/ozone_platform_dri.h b/ui/ozone/platform/dri/ozone_platform_dri.h index b5136b7..64df1cc 100644 --- a/ui/ozone/platform/dri/ozone_platform_dri.h +++ b/ui/ozone/platform/dri/ozone_platform_dri.h @@ -6,7 +6,7 @@ #define UI_OZONE_PLATFORM_DRI_OZONE_PLATFORM_DRI_H_ #include "ui/events/ozone/evdev/event_factory.h" -#include "ui/gfx/ozone/impl/dri_surface_factory.h" +#include "ui/gfx/ozone/dri/dri_surface_factory.h" #include "ui/ozone/ozone_platform.h" namespace ui { diff --git a/ui/ui_unittests.gyp b/ui/ui_unittests.gyp index bc7c586..eed68fe 100644 --- a/ui/ui_unittests.gyp +++ b/ui/ui_unittests.gyp @@ -185,9 +185,9 @@ 'gfx/font_list_unittest.cc', 'gfx/image/image_mac_unittest.mm', 'gfx/image/image_util_unittest.cc', - 'gfx/ozone/impl/hardware_display_controller_unittest.cc', - 'gfx/ozone/impl/dri_surface_factory_unittest.cc', - 'gfx/ozone/impl/dri_surface_unittest.cc', + 'gfx/ozone/dri/hardware_display_controller_unittest.cc', + 'gfx/ozone/dri/dri_surface_factory_unittest.cc', + 'gfx/ozone/dri/dri_surface_unittest.cc', 'gfx/platform_font_mac_unittest.mm', 'gfx/render_text_unittest.cc', 'gfx/sequential_id_generator_unittest.cc', |