Commit 1332623f authored by jamesr@chromium.org's avatar jamesr@chromium.org

Remove unused include and always-true compile-time check

BUG=


Review URL: https://chromiumcodereview.appspot.com/10827267

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150986 0039d316-1c4b-4281-b951-d872f2087c98
parent 9f4b802c
......@@ -67,7 +67,6 @@
#include "net/base/net_util.h"
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_request_context_getter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/layout.h"
#include "ui/base/ui_base_switches.h"
......@@ -598,15 +597,6 @@ WebPreferences WebContentsImpl::GetWebkitPrefs(RenderViewHost* rvh,
prefs.accelerated_2d_canvas_enabled = false;
}
#if !defined(WEBCOMPOSITOR_OWNS_SETTINGS)
prefs.threaded_animation_enabled =
!command_line.HasSwitch(switches::kDisableThreadedAnimation);
prefs.per_tile_painting_enabled =
command_line.HasSwitch(switches::kEnablePerTilePainting);
prefs.partial_swap_enabled =
command_line.HasSwitch(switches::kEnablePartialSwap);
#endif
if (command_line.HasSwitch(switches::kDefaultTileWidth))
prefs.default_tile_width =
GetSwitchValueAsInt(command_line, switches::kDefaultTileWidth, 1);
......
......@@ -30,7 +30,6 @@
#include "media/base/media_log_event.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h"
......@@ -214,11 +213,6 @@ IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(css_variables_enabled)
IPC_STRUCT_TRAITS_MEMBER(device_supports_touch)
IPC_STRUCT_TRAITS_MEMBER(device_supports_mouse)
#if !defined(WEBCOMPOSITOR_OWNS_SETTINGS)
IPC_STRUCT_TRAITS_MEMBER(threaded_animation_enabled)
IPC_STRUCT_TRAITS_MEMBER(partial_swap_enabled)
IPC_STRUCT_TRAITS_MEMBER(per_tile_painting_enabled)
#endif
IPC_STRUCT_TRAITS_MEMBER(default_tile_width)
IPC_STRUCT_TRAITS_MEMBER(default_tile_height)
IPC_STRUCT_TRAITS_MEMBER(max_untiled_layer_width)
......
......@@ -74,8 +74,9 @@
#include "media/base/media.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositor.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebColorName.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
......@@ -86,7 +87,6 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "ui/base/layout.h"
#include "ui/base/ui_base_switches.h"
#include "v8/include/v8.h"
......@@ -255,14 +255,12 @@ void RenderThreadImpl::Init() {
if (command_line.HasSwitch(switches::kEnableGpuBenchmarking))
RegisterExtension(content::GpuBenchmarkingExtension::Get());
#if defined(WEBCOMPOSITOR_OWNS_SETTINGS)
WebKit::WebCompositor::setAcceleratedAnimationEnabled(
!command_line.HasSwitch(switches::kDisableThreadedAnimation));
WebKit::WebCompositor::setPerTilePaintingEnabled(
command_line.HasSwitch(switches::kEnablePerTilePainting));
WebKit::WebCompositor::setPartialSwapEnabled(
command_line.HasSwitch(switches::kEnablePartialSwap));
#endif
// Note that under Linux, the media library will normally already have
// been initialized by the Zygote before this instance became a Renderer.
......
......@@ -149,13 +149,6 @@ Compositor::Compositor(CompositorDelegate* delegate,
settings.refreshRate =
test_compositor_enabled ? kTestRefreshRate : kDefaultRefreshRate;
#if !defined(WEBCOMPOSITOR_OWNS_SETTINGS)
settings.partialSwapEnabled =
command_line->HasSwitch(switches::kUIEnablePartialSwap);
settings.perTilePainting =
command_line->HasSwitch(switches::kUIEnablePerTilePainting);
#endif
host_.initialize(this, root_web_layer_, settings);
host_.setSurfaceReady();
root_web_layer_.setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f));
......@@ -180,14 +173,12 @@ Compositor::~Compositor() {
}
void Compositor::Initialize(bool use_thread) {
#if defined(WEBCOMPOSITOR_OWNS_SETTINGS)
CommandLine* command_line = CommandLine::ForCurrentProcess();
// These settings must be applied before we initialize the compositor.
WebKit::WebCompositor::setPartialSwapEnabled(
command_line->HasSwitch(switches::kUIEnablePartialSwap));
WebKit::WebCompositor::setPerTilePaintingEnabled(
command_line->HasSwitch(switches::kUIEnablePerTilePainting));
#endif
if (use_thread)
g_compositor_thread = new webkit_glue::WebThreadImpl("Browser Compositor");
WebKit::WebCompositor::initialize(g_compositor_thread);
......
......@@ -106,11 +106,6 @@ WebPreferences::WebPreferences()
css_variables_enabled(false),
device_supports_touch(false),
device_supports_mouse(true),
#if !defined(WEBCOMPOSITOR_OWNS_SETTINGS)
threaded_animation_enabled(false),
per_tile_painting_enabled(false),
partial_swap_enabled(false),
#endif
default_tile_width(256),
default_tile_height(256),
max_untiled_layer_width(512),
......@@ -397,16 +392,6 @@ void WebPreferences::Apply(WebView* web_view) const {
settings->setDeviceSupportsTouch(device_supports_touch);
settings->setDeviceSupportsMouse(device_supports_mouse);
#if !defined(WEBCOMPOSITOR_OWNS_SETTINGS)
settings->setThreadedAnimationEnabled(threaded_animation_enabled);
// Enable per-tile painting if requested on the command line.
settings->setPerTilePaintingEnabled(per_tile_painting_enabled);
// Enable partial swaps if specified form the command line.
settings->setPartialSwapEnabled(partial_swap_enabled);
#endif
settings->setDefaultTileSize(
WebSize(default_tile_width, default_tile_height));
settings->setMaxUntiledLayerSize(
......
......@@ -18,7 +18,6 @@
#include "base/string16.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/webkit_glue_export.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
namespace WebKit {
class WebView;
......@@ -124,11 +123,6 @@ struct WEBKIT_GLUE_EXPORT WebPreferences {
bool css_variables_enabled;
bool device_supports_touch;
bool device_supports_mouse;
#if !defined(WEBCOMPOSITOR_OWNS_SETTINGS)
bool threaded_animation_enabled;
bool per_tile_painting_enabled;
bool partial_swap_enabled;
#endif
int default_tile_width;
int default_tile_height;
int max_untiled_layer_width;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment