diff options
44 files changed, 146 insertions, 91 deletions
diff --git a/app/app_base.gypi b/app/app_base.gypi index 5e73c11..9c50598 100644 --- a/app/app_base.gypi +++ b/app/app_base.gypi @@ -232,14 +232,6 @@ 'sql/statement.h', 'sql/transaction.cc', 'sql/transaction.h', - 'surface/accelerated_surface_mac.cc', - 'surface/accelerated_surface_mac.h', - 'surface/io_surface_support_mac.cc', - 'surface/io_surface_support_mac.h', - 'surface/transport_dib.h', - 'surface/transport_dib_linux.cc', - 'surface/transport_dib_mac.cc', - 'surface/transport_dib_win.cc', 'win/iat_patch_function.cc', 'win/iat_patch_function.h', 'win/scoped_co_mem.h', diff --git a/chrome/browser/renderer_host/browser_render_process_host.h b/chrome/browser/renderer_host/browser_render_process_host.h index 23a3384..2ea15fe 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.h +++ b/chrome/browser/renderer_host/browser_render_process_host.h @@ -10,7 +10,6 @@ #include <queue> #include <string> -#include "app/surface/transport_dib.h" #include "base/platform_file.h" #include "base/process.h" #include "base/scoped_callback_factory.h" @@ -22,6 +21,7 @@ #include "content/common/notification_observer.h" #include "content/common/notification_registrar.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" +#include "ui/gfx/surface/transport_dib.h" class CommandLine; class RendererMainThread; diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index a63de41..40ddd67 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -6,7 +6,6 @@ #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" -#include "app/surface/io_surface_support_mac.h" #include "base/command_line.h" #include "base/logging.h" #include "base/mac/scoped_cftyperef.h" @@ -43,6 +42,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "ui/gfx/gl/gl_switches.h" +#include "ui/gfx/surface/io_surface_support_mac.h" #include "webkit/glue/webaccessibility.h" #include "webkit/plugins/npapi/webplugin.h" diff --git a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc index 0e00f4e..3ae9ec1 100644 --- a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc +++ b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "base/stringprintf.h" #include "chrome/browser/history/top_sites.h" @@ -17,6 +16,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkColorPriv.h" #include "ui/gfx/canvas_skia.h" +#include "ui/gfx/surface/transport_dib.h" static const int kBitmapWidth = 100; static const int kBitmapHeight = 100; diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index f771b5f..58df726 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -43,6 +43,7 @@ '../third_party/libxml/libxml.gyp:libxml', '../third_party/npapi/npapi.gyp:npapi', '../ui/base/strings/ui_strings.gyp:ui_strings', + '../ui/gfx/surface/surface.gyp:surface', '../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:blob', '../webkit/support/webkit_support.gyp:database', diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index 9bb0139..1b7163e 100644 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -25,6 +25,7 @@ '../third_party/icu/icu.gyp:icuuc', '../third_party/npapi/npapi.gyp:npapi', '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', + '../ui/gfx/surface/surface.gyp:surface', '../webkit/support/webkit_support.gyp:glue', '../webkit/support/webkit_support.gyp:webkit_gpu', '../webkit/support/webkit_support.gyp:webkit_resources', diff --git a/chrome/renderer/mock_render_process.cc b/chrome/renderer/mock_render_process.cc index a93084d..cb4c184 100644 --- a/chrome/renderer/mock_render_process.cc +++ b/chrome/renderer/mock_render_process.cc @@ -1,11 +1,11 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "chrome/renderer/mock_render_process.h" -#include "app/surface/transport_dib.h" #include "ui/gfx/rect.h" +#include "ui/gfx/surface/transport_dib.h" MockRenderProcess::MockRenderProcess() : transport_dib_next_sequence_number_(0) { diff --git a/chrome/renderer/nacl_desc_wrapper_chrome.cc b/chrome/renderer/nacl_desc_wrapper_chrome.cc index a4efc70..eb142993 100644 --- a/chrome/renderer/nacl_desc_wrapper_chrome.cc +++ b/chrome/renderer/nacl_desc_wrapper_chrome.cc @@ -1,13 +1,13 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/surface/transport_dib.h" #include "base/shared_memory.h" #include "base/sync_socket.h" #include "native_client/src/trusted/desc/nacl_desc_base.h" #include "native_client/src/trusted/desc/nacl_desc_sync_socket.h" #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" +#include "ui/gfx/surface/transport_dib.h" namespace nacl { diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc index 9d63c77..917b3f6 100644 --- a/chrome/renderer/render_process_impl.cc +++ b/chrome/renderer/render_process_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -12,7 +12,6 @@ #include "chrome/renderer/render_process_impl.h" -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "base/command_line.h" #include "base/compiler_specific.h" @@ -34,6 +33,7 @@ #include "media/base/media.h" #include "media/base/media_switches.h" #include "skia/ext/platform_canvas.h" +#include "ui/gfx/surface/transport_dib.h" #include "webkit/plugins/npapi/plugin_instance.h" #include "webkit/plugins/npapi/plugin_lib.h" #include "webkit/glue/webkit_glue.h" diff --git a/content/browser/renderer_host/accelerated_surface_container_mac.cc b/content/browser/renderer_host/accelerated_surface_container_mac.cc index 5bd23a95..e76103c 100644 --- a/content/browser/renderer_host/accelerated_surface_container_mac.cc +++ b/content/browser/renderer_host/accelerated_surface_container_mac.cc @@ -1,12 +1,12 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "content/browser/renderer_host/accelerated_surface_container_mac.h" -#include "app/surface/io_surface_support_mac.h" #include "base/logging.h" #include "content/browser/renderer_host/accelerated_surface_container_manager_mac.h" +#include "ui/gfx/surface/io_surface_support_mac.h" #include "webkit/plugins/npapi/webplugin.h" AcceleratedSurfaceContainerMac::AcceleratedSurfaceContainerMac( diff --git a/content/browser/renderer_host/accelerated_surface_container_mac.h b/content/browser/renderer_host/accelerated_surface_container_mac.h index 2bffb32..8b9de53 100644 --- a/content/browser/renderer_host/accelerated_surface_container_mac.h +++ b/content/browser/renderer_host/accelerated_surface_container_mac.h @@ -1,9 +1,9 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 CONTENT_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ -#define CONTENT_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ +#ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MAC_H_ +#define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MAC_H_ #pragma once // The "GPU plugin" is currently implemented as a special kind of @@ -29,12 +29,12 @@ #include <CoreFoundation/CoreFoundation.h> #include <OpenGL/OpenGL.h> -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "base/mac/scoped_cftyperef.h" #include "base/scoped_ptr.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" +#include "ui/gfx/surface/transport_dib.h" namespace webkit { namespace npapi { @@ -149,4 +149,4 @@ class AcceleratedSurfaceContainerMac { DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac); }; -#endif // CONTENT_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ +#endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MAC_H_ diff --git a/content/browser/renderer_host/accelerated_surface_container_manager_mac.h b/content/browser/renderer_host/accelerated_surface_container_manager_mac.h index e3a4e0e..8e5cd22 100644 --- a/content/browser/renderer_host/accelerated_surface_container_manager_mac.h +++ b/content/browser/renderer_host/accelerated_surface_container_manager_mac.h @@ -1,18 +1,18 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 CONTENT_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ -#define CONTENT_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ +#ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_MAC_H_ +#define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_MAC_H_ #pragma once #include <OpenGL/OpenGL.h> #include <map> -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "base/synchronization/lock.h" #include "ui/gfx/native_widget_types.h" +#include "ui/gfx/surface/transport_dib.h" namespace webkit { namespace npapi { @@ -122,4 +122,4 @@ class AcceleratedSurfaceContainerManagerMac { DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac); }; -#endif // CONTENT_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ +#endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_MAC_H_ diff --git a/content/browser/renderer_host/backing_store.h b/content/browser/renderer_host/backing_store.h index 5043b3e..1c4bad7 100644 --- a/content/browser/renderer_host/backing_store.h +++ b/content/browser/renderer_host/backing_store.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,9 +8,9 @@ #include <vector> -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" class RenderProcessHost; class RenderWidgetHost; diff --git a/content/browser/renderer_host/backing_store_mac.mm b/content/browser/renderer_host/backing_store_mac.mm index 424a7b8..68da54e 100644 --- a/content/browser/renderer_host/backing_store_mac.mm +++ b/content/browser/renderer_host/backing_store_mac.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -6,7 +6,6 @@ #include "content/browser/renderer_host/backing_store_mac.h" -#include "app/surface/transport_dib.h" #include "base/logging.h" #include "base/mac/mac_util.h" #include "base/mac/scoped_cftyperef.h" @@ -18,6 +17,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkCanvas.h" #include "ui/gfx/rect.h" +#include "ui/gfx/surface/transport_dib.h" // Mac Backing Stores: // diff --git a/content/browser/renderer_host/backing_store_manager.h b/content/browser/renderer_host/backing_store_manager.h index bc09fc7..26dcd1c 100644 --- a/content/browser/renderer_host/backing_store_manager.h +++ b/content/browser/renderer_host/backing_store_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,11 +8,11 @@ #include <vector> -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "base/process.h" #include "ui/gfx/rect.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" class BackingStore; class RenderWidgetHost; diff --git a/content/browser/renderer_host/backing_store_win.cc b/content/browser/renderer_host/backing_store_win.cc index 0023b51..0a1645d7 100644 --- a/content/browser/renderer_host/backing_store_win.cc +++ b/content/browser/renderer_host/backing_store_win.cc @@ -1,16 +1,16 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "content/browser/renderer_host/backing_store_win.h" -#include "app/surface/transport_dib.h" #include "base/command_line.h" #include "chrome/common/chrome_switches.h" #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/renderer_host/render_widget_host.h" #include "skia/ext/platform_canvas.h" #include "ui/gfx/gdi_util.h" +#include "ui/gfx/surface/transport_dib.h" namespace { @@ -69,7 +69,8 @@ void CallStretchDIBits(HDC hdc, int dest_x, int dest_y, int dest_w, int dest_h, } // namespace -BackingStoreWin::BackingStoreWin(RenderWidgetHost* widget, const gfx::Size& size) +BackingStoreWin::BackingStoreWin(RenderWidgetHost* widget, + const gfx::Size& size) : BackingStore(widget, size), backing_store_dib_(NULL), original_bitmap_(NULL) { diff --git a/content/browser/renderer_host/backing_store_x.cc b/content/browser/renderer_host/backing_store_x.cc index 5e1e33a..8561eab 100644 --- a/content/browser/renderer_host/backing_store_x.cc +++ b/content/browser/renderer_host/backing_store_x.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -18,7 +18,6 @@ #include <utility> #include <limits> -#include "app/surface/transport_dib.h" #include "base/compiler_specific.h" #include "base/logging.h" #include "base/metrics/histogram.h" @@ -29,6 +28,7 @@ #include "ui/base/x/x11_util.h" #include "ui/base/x/x11_util_internal.h" #include "ui/gfx/rect.h" +#include "ui/gfx/surface/transport_dib.h" // Assume that somewhere along the line, someone will do width * height * 4 // with signed numbers. If the maximum value is 2**31, then 2**31 / 4 = diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h index 350c6b7..84e130c 100644 --- a/content/browser/renderer_host/render_message_filter.h +++ b/content/browser/renderer_host/render_message_filter.h @@ -13,7 +13,6 @@ #include <string> #include <vector> -#include "app/surface/transport_dib.h" #include "base/file_path.h" #include "base/linked_ptr.h" #include "base/shared_memory.h" @@ -27,6 +26,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" #include "ui/gfx/native_widget_types.h" +#include "ui/gfx/surface/transport_dib.h" class ChromeURLRequestContext; struct FontDescriptor; diff --git a/content/browser/renderer_host/render_process_host.h b/content/browser/renderer_host/render_process_host.h index cc469fa..b55d8a1 100644 --- a/content/browser/renderer_host/render_process_host.h +++ b/content/browser/renderer_host/render_process_host.h @@ -8,7 +8,6 @@ #include <set> -#include "app/surface/transport_dib.h" #include "base/id_map.h" #include "base/process.h" #include "base/process_util.h" @@ -16,6 +15,7 @@ #include "base/time.h" #include "chrome/common/visitedlink_common.h" #include "ipc/ipc_sync_channel.h" +#include "ui/gfx/surface/transport_dib.h" class Profile; class URLRequestContextGetter; diff --git a/content/browser/renderer_host/render_widget_helper.h b/content/browser/renderer_host/render_widget_helper.h index 1b3eae5..91c9a58 100644 --- a/content/browser/renderer_host/render_widget_helper.h +++ b/content/browser/renderer_host/render_widget_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,7 +8,6 @@ #include <map> -#include "app/surface/transport_dib.h" #include "base/atomic_sequence_num.h" #include "base/hash_tables.h" #include "base/process.h" @@ -17,6 +16,7 @@ #include "base/synchronization/waitable_event.h" #include "content/common/window_container_type.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" +#include "ui/gfx/surface/transport_dib.h" namespace IPC { class Message; diff --git a/content/browser/renderer_host/render_widget_host.h b/content/browser/renderer_host/render_widget_host.h index 11cc45d..0383883 100644 --- a/content/browser/renderer_host/render_widget_host.h +++ b/content/browser/renderer_host/render_widget_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -10,7 +10,6 @@ #include <string> #include <vector> -#include "app/surface/transport_dib.h" #include "base/gtest_prod_util.h" #include "base/process_util.h" #include "base/scoped_ptr.h" @@ -26,6 +25,7 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" namespace gfx { class Rect; diff --git a/content/browser/renderer_host/render_widget_host_view.h b/content/browser/renderer_host/render_widget_host_view.h index d103280..5d4cf69 100644 --- a/content/browser/renderer_host/render_widget_host_view.h +++ b/content/browser/renderer_host/render_widget_host_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -13,7 +13,6 @@ #include <string> #include <vector> -#include "app/surface/transport_dib.h" #include "base/process_util.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColor.h" @@ -21,6 +20,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" +#include "ui/gfx/surface/transport_dib.h" namespace gfx { class Rect; diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index 7b80e6a..585faa5 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -93,7 +93,7 @@ #include "webkit/glue/webpreferences.h" #if defined(OS_MACOSX) -#include "app/surface/io_surface_support_mac.h" +#include "ui/gfx/surface/io_surface_support_mac.h" #endif // defined(OS_MACOSX) // Cross-Site Navigations diff --git a/content/common/common_param_traits.h b/content/common/common_param_traits.h index 1689cb1..d25ba12 100644 --- a/content/common/common_param_traits.h +++ b/content/common/common_param_traits.h @@ -14,7 +14,6 @@ #define CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ #pragma once -#include "app/surface/transport_dib.h" #include "base/platform_file.h" #include "base/ref_counted.h" #include "base/string_number_conversions.h" @@ -25,6 +24,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" #include "ui/gfx/native_widget_types.h" +#include "ui/gfx/surface/transport_dib.h" #include "webkit/blob/blob_data.h" #include "webkit/glue/npruntime_util.h" #include "webkit/glue/resource_type.h" diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 6e37ebc..8b72a6d 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -17,6 +17,7 @@ '../third_party/libjingle/libjingle.gyp:libjingle', '../third_party/npapi/npapi.gyp:npapi', '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', + '../ui/gfx/surface/surface.gyp:surface', ], 'include_dirs': [ '..', diff --git a/content/plugin/webplugin_accelerated_surface_proxy_mac.cc b/content/plugin/webplugin_accelerated_surface_proxy_mac.cc index ec4571d..58f27fd 100644 --- a/content/plugin/webplugin_accelerated_surface_proxy_mac.cc +++ b/content/plugin/webplugin_accelerated_surface_proxy_mac.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -6,9 +6,9 @@ #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" -#include "app/surface/accelerated_surface_mac.h" -#include "app/surface/transport_dib.h" #include "content/plugin/webplugin_proxy.h" +#include "ui/gfx/surface/accelerated_surface_mac.h" +#include "ui/gfx/surface/transport_dib.h" WebPluginAcceleratedSurfaceProxy::WebPluginAcceleratedSurfaceProxy( WebPluginProxy* plugin_proxy) diff --git a/content/plugin/webplugin_proxy.h b/content/plugin/webplugin_proxy.h index 8dbfa9e..9f891a2 100644 --- a/content/plugin/webplugin_proxy.h +++ b/content/plugin/webplugin_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,10 +8,6 @@ #include <string> -#if defined(USE_X11) -#include "ui/base/x/x11_util.h" -#endif -#include "app/surface/transport_dib.h" #include "base/hash_tables.h" #include "base/ref_counted.h" #if defined(OS_MACOSX) @@ -23,6 +19,10 @@ #include "base/timer.h" #include "googleurl/src/gurl.h" #include "ipc/ipc_message.h" +#if defined(USE_X11) +#include "ui/base/x/x11_util.h" +#endif +#include "ui/gfx/surface/transport_dib.h" #include "webkit/plugins/npapi/webplugin.h" class PluginChannel; diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc index c5f50e8..a65cf32 100644 --- a/content/renderer/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper_plugin_delegate_impl.cc @@ -7,7 +7,6 @@ #include <cmath> #include <queue> -#include "app/surface/transport_dib.h" #include "base/callback.h" #include "base/file_path.h" #include "base/logging.h" @@ -47,6 +46,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" #include "webkit/fileapi/file_system_callback_dispatcher.h" #include "webkit/glue/context_menu.h" #include "webkit/plugins/npapi/webplugin.h" diff --git a/content/renderer/render_view.h b/content/renderer/render_view.h index 734650c..59e2626 100644 --- a/content/renderer/render_view.h +++ b/content/renderer/render_view.h @@ -13,7 +13,6 @@ #include <string> #include <vector> -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "base/gtest_prod_util.h" #include "base/id_map.h" @@ -42,6 +41,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationType.h" +#include "ui/gfx/surface/transport_dib.h" #include "webkit/glue/webpreferences.h" #include "webkit/plugins/npapi/webplugin_page_delegate.h" diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 058d21e..a115909 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -4,7 +4,6 @@ #include "content/renderer/render_widget.h" -#include "app/surface/transport_dib.h" #include "base/command_line.h" #include "base/logging.h" #include "base/message_loop.h" @@ -30,6 +29,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" #include "ui/gfx/point.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index 905a7a8..5c2d9c3 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,7 +8,6 @@ #include <vector> -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "base/ref_counted.h" #include "chrome/renderer/render_process.h" @@ -24,6 +23,7 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" #include "webkit/glue/webcursor.h" class RenderThreadBase; diff --git a/content/renderer/render_widget_browsertest.cc b/content/renderer/render_widget_browsertest.cc index 5f32ce1..478aeec 100644 --- a/content/renderer/render_widget_browsertest.cc +++ b/content/renderer/render_widget_browsertest.cc @@ -1,10 +1,9 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "content/renderer/render_widget_browsertest.h" -#include "app/surface/transport_dib.h" #include "base/basictypes.h" #include "base/file_path.h" #include "base/file_util.h" @@ -17,6 +16,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/gfx/codec/jpeg_codec.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" const int RenderWidgetTest::kNumBytesPerPixel = 4; const int RenderWidgetTest::kLargeWidth = 1024; diff --git a/content/renderer/webplugin_delegate_proxy.h b/content/renderer/webplugin_delegate_proxy.h index f495b89..ddfebcc 100644 --- a/content/renderer/webplugin_delegate_proxy.h +++ b/content/renderer/webplugin_delegate_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -9,7 +9,6 @@ #include <string> #include <vector> -#include "app/surface/transport_dib.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/weak_ptr.h" @@ -18,6 +17,7 @@ #include "ipc/ipc_message.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" +#include "ui/gfx/surface/transport_dib.h" #include "webkit/plugins/npapi/webplugininfo.h" #include "webkit/plugins/npapi/webplugin_delegate.h" diff --git a/gpu/command_buffer/service/gpu_processor.h b/gpu/command_buffer/service/gpu_processor.h index 1682ad8..7dfba2a 100644 --- a/gpu/command_buffer/service/gpu_processor.h +++ b/gpu/command_buffer/service/gpu_processor.h @@ -8,7 +8,6 @@ #include <queue> #include <vector> -#include "app/surface/transport_dib.h" #include "base/callback.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" @@ -20,9 +19,10 @@ #include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" #if defined(OS_MACOSX) -#include "app/surface/accelerated_surface_mac.h" +#include "ui/gfx/surface/accelerated_surface_mac.h" #endif namespace gfx { diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp index 0ebacf8..4b25208 100644 --- a/gpu/gpu.gyp +++ b/gpu/gpu.gyp @@ -181,6 +181,7 @@ '../app/app.gyp:app_base', '../base/base.gyp:base', '../ui/ui.gyp:ui_gfx', + '../ui/gfx/surface/surface.gyp:surface', '../third_party/angle/src/build_angle.gyp:translator_glsl', ], 'sources': [ diff --git a/app/surface/accelerated_surface_mac.cc b/ui/gfx/surface/accelerated_surface_mac.cc index 6322603..59919f8 100644 --- a/app/surface/accelerated_surface_mac.cc +++ b/ui/gfx/surface/accelerated_surface_mac.cc @@ -1,15 +1,15 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/surface/accelerated_surface_mac.h" +#include "ui/gfx/surface/accelerated_surface_mac.h" #include "app/gfx/gl/gl_bindings.h" #include "app/gfx/gl/gl_implementation.h" -#include "app/surface/io_surface_support_mac.h" #include "base/logging.h" #include "base/mac/scoped_cftyperef.h" #include "ui/gfx/rect.h" +#include "ui/gfx/surface/io_surface_support_mac.h" AcceleratedSurface::AcceleratedSurface() : io_surface_id_(0), diff --git a/app/surface/accelerated_surface_mac.h b/ui/gfx/surface/accelerated_surface_mac.h index 8f7aaf0..44ce8d5 100644 --- a/app/surface/accelerated_surface_mac.h +++ b/ui/gfx/surface/accelerated_surface_mac.h @@ -1,20 +1,20 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 APP_SURFACE_ACCELERATED_SURFACE_MAC_H_ -#define APP_SURFACE_ACCELERATED_SURFACE_MAC_H_ +#ifndef UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_ +#define UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_ #pragma once #include <CoreFoundation/CoreFoundation.h> #include "app/gfx/gl/gl_context.h" -#include "app/surface/transport_dib.h" #include "base/callback.h" #include "base/mac/scoped_cftyperef.h" #include "base/scoped_ptr.h" #include "ui/gfx/rect.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/transport_dib.h" // Should not include GL headers in a header file. Forward declare these types // instead. @@ -164,4 +164,4 @@ class AcceleratedSurface { scoped_ptr<Callback1<TransportDIB::Id>::Type> dib_free_callback_; }; -#endif // APP_SURFACE_ACCELERATED_SURFACE_MAC_H_ +#endif // UI_GFX_SURFACE_ACCELERATED_SURFACE_MAC_H_ diff --git a/app/surface/io_surface_support_mac.cc b/ui/gfx/surface/io_surface_support_mac.cc index 28eb18a..15e33dc 100644 --- a/app/surface/io_surface_support_mac.cc +++ b/ui/gfx/surface/io_surface_support_mac.cc @@ -1,11 +1,11 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 <dlfcn.h> #include "base/singleton.h" -#include "app/surface/io_surface_support_mac.h" +#include "ui/gfx/surface/io_surface_support_mac.h" typedef CFTypeRef (*IOSurfaceCreateProcPtr)(CFDictionaryRef properties); typedef uint32 (*IOSurfaceGetIDProcPtr)(CFTypeRef io_surface); diff --git a/app/surface/io_surface_support_mac.h b/ui/gfx/surface/io_surface_support_mac.h index 82dccca..e8d01b9 100644 --- a/app/surface/io_surface_support_mac.h +++ b/ui/gfx/surface/io_surface_support_mac.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 APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ -#define APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ +#ifndef UI_GFX_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ +#define UI_GFX_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ #pragma once #include <CoreFoundation/CoreFoundation.h> @@ -66,5 +66,5 @@ class IOSurfaceSupport { DISALLOW_COPY_AND_ASSIGN(IOSurfaceSupport); }; -#endif // APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ +#endif // UI_GFX_SURFACE_IO_SURFACE_SUPPORT_MAC_H_ diff --git a/ui/gfx/surface/surface.gyp b/ui/gfx/surface/surface.gyp new file mode 100644 index 0000000..c7d1dca --- /dev/null +++ b/ui/gfx/surface/surface.gyp @@ -0,0 +1,57 @@ +# Copyright (c) 2011 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. + +{ + 'target_defaults': { + 'sources/': [ + ['exclude', '/(cocoa|gtk|win)/'], + ['exclude', '_(cocoa|gtk|linux|mac|posix|win|x)\\.(cc|mm?)$'], + ['exclude', '/(gtk|win|x11)_[^/]*\\.cc$'], + ], + 'conditions': [ + ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {'sources/': [ + ['include', '/gtk/'], + ['include', '_(gtk|linux|posix|skia|x)\\.cc$'], + ['include', '/(gtk|x11)_[^/]*\\.cc$'], + ]}], + ['OS=="mac"', {'sources/': [ + ['include', '/cocoa/'], + ['include', '_(cocoa|mac|posix)\\.(cc|mm?)$'], + ]}, { # else: OS != "mac" + 'sources/': [ + ['exclude', '\\.mm?$'], + ], + }], + ['OS=="win"', + {'sources/': [ + ['include', '_(win)\\.cc$'], + ['include', '/win/'], + ['include', '/win_[^/]*\\.cc$'], + ]}], + ], + }, + 'targets': [ + { + 'target_name': 'surface', + 'type': '<(library)', + 'msvs_guid': '6C99567D-6F02-43B5-BB35-D8E3F8D0D6D2', + 'dependencies': [ + '<(DEPTH)/base/base.gyp:base', + '<(DEPTH)/app/app.gyp:app_base', + '<(DEPTH)/skia/skia.gyp:skia', + '<(DEPTH)/ui/ui.gyp:ui_gfx', + ], + 'sources': [ + 'accelerated_surface_mac.cc', + 'accelerated_surface_mac.h', + 'io_surface_support_mac.cc', + 'io_surface_support_mac.h', + 'transport_dib.h', + 'transport_dib_linux.cc', + 'transport_dib_mac.cc', + 'transport_dib_win.cc', + ], + }, + ], +} diff --git a/app/surface/transport_dib.h b/ui/gfx/surface/transport_dib.h index d13168a..1834eec 100644 --- a/app/surface/transport_dib.h +++ b/ui/gfx/surface/transport_dib.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 APP_SURFACE_TRANSPORT_DIB_H_ -#define APP_SURFACE_TRANSPORT_DIB_H_ +#ifndef UI_GFX_SURFACE_TRANSPORT_DIB_H_ +#define UI_GFX_SURFACE_TRANSPORT_DIB_H_ #pragma once #include "base/basictypes.h" @@ -199,4 +199,4 @@ class TransportDIB { DISALLOW_COPY_AND_ASSIGN(TransportDIB); }; -#endif // APP_SURFACE_TRANSPORT_DIB_H_ +#endif // UI_GFX_SURFACE_TRANSPORT_DIB_H_ diff --git a/app/surface/transport_dib_linux.cc b/ui/gfx/surface/transport_dib_linux.cc index 614cdb0..3e31c7b 100644 --- a/app/surface/transport_dib_linux.cc +++ b/ui/gfx/surface/transport_dib_linux.cc @@ -1,13 +1,14 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "ui/gfx/surface/transport_dib.h" + #include <errno.h> #include <stdlib.h> #include <sys/ipc.h> #include <sys/shm.h> -#include "app/surface/transport_dib.h" #include "base/logging.h" #include "base/scoped_ptr.h" #include "skia/ext/platform_canvas.h" diff --git a/app/surface/transport_dib_mac.cc b/ui/gfx/surface/transport_dib_mac.cc index c0dd457..268bce1 100644 --- a/app/surface/transport_dib_mac.cc +++ b/ui/gfx/surface/transport_dib_mac.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/surface/transport_dib.h" +#include "ui/gfx/surface/transport_dib.h" #include <unistd.h> #include <sys/stat.h> diff --git a/app/surface/transport_dib_win.cc b/ui/gfx/surface/transport_dib_win.cc index 3de7fab..977153f 100644 --- a/app/surface/transport_dib_win.cc +++ b/ui/gfx/surface/transport_dib_win.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "app/surface/transport_dib.h" +#include "ui/gfx/surface/transport_dib.h" #include <windows.h> |