summaryrefslogtreecommitdiffstats
path: root/ui/compositor
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 06:05:16 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 06:05:16 +0000
commit2cccfef9bf75884602b8203b7c1af5b7e20c2b7c (patch)
tree6219ca8a52a6fcd7e5fa0aadbb1346e6de0d7709 /ui/compositor
parent4f162cab4d586d582604a5db49dbf392a12fed33 (diff)
downloadchromium_src-2cccfef9bf75884602b8203b7c1af5b7e20c2b7c.zip
chromium_src-2cccfef9bf75884602b8203b7c1af5b7e20c2b7c.tar.gz
chromium_src-2cccfef9bf75884602b8203b7c1af5b7e20c2b7c.tar.bz2
cc: Add initial GPU-to-GPU copy rasterizer implementation.
This adds a derived RasterWorkerPool class that use a smaller resource pool for staging and initialize tile resources by copying the contents of a staging resource to a tile resource using CHROMIUM_copy_texture. Zero-copy is still used by default when map-image rasterizer is enabled using --enable-map-image. GPU-to-GPU copy rasterizer is used when --disable-zero-copy switch is provided in combination with --enable-map-image. This zero-copy setting is also added to about:flags. BUG=269808 TBR=sky Review URL: https://codereview.chromium.org/236313006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/compositor')
-rw-r--r--ui/compositor/compositor.cc2
-rw-r--r--ui/compositor/compositor_switches.cc6
-rw-r--r--ui/compositor/compositor_switches.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index d9149b6..423f2bf 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -154,7 +154,7 @@ Compositor::Compositor(gfx::AcceleratedWidget widget)
command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
settings.impl_side_painting = IsUIImplSidePaintingEnabled();
- settings.use_map_image = IsUIMapImageEnabled();
+ settings.use_zero_copy = IsUIZeroCopyEnabled();
base::TimeTicks before_create = base::TimeTicks::Now();
if (!!g_compositor_thread) {
diff --git a/ui/compositor/compositor_switches.cc b/ui/compositor/compositor_switches.cc
index d63b269..a7ffc14 100644
--- a/ui/compositor/compositor_switches.cc
+++ b/ui/compositor/compositor_switches.cc
@@ -19,7 +19,7 @@ const char kUIDisableThreadedCompositing[] = "ui-disable-threaded-compositing";
const char kUIEnableImplSidePainting[] = "ui-enable-impl-side-painting";
-const char kUIEnableMapImage[] = "ui-enable-map-image";
+const char kUIEnableZeroCopy[] = "ui-enable-zero-copy";
const char kUIShowPaintRects[] = "ui-show-paint-rects";
@@ -33,10 +33,10 @@ bool IsUIImplSidePaintingEnabled() {
return command_line.HasSwitch(switches::kUIEnableImplSidePainting);
}
-bool IsUIMapImageEnabled() {
+bool IsUIZeroCopyEnabled() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- return command_line.HasSwitch(switches::kUIEnableMapImage);
+ return command_line.HasSwitch(switches::kUIEnableZeroCopy);
}
} // namespace ui
diff --git a/ui/compositor/compositor_switches.h b/ui/compositor/compositor_switches.h
index 6518d4f..d487bdd 100644
--- a/ui/compositor/compositor_switches.h
+++ b/ui/compositor/compositor_switches.h
@@ -13,7 +13,7 @@ COMPOSITOR_EXPORT extern const char kEnableHardwareOverlays[];
COMPOSITOR_EXPORT extern const char kEnablePixelOutputInTests[];
COMPOSITOR_EXPORT extern const char kUIDisableThreadedCompositing[];
COMPOSITOR_EXPORT extern const char kUIEnableImplSidePainting[];
-COMPOSITOR_EXPORT extern const char kUIEnableMapImage[];
+COMPOSITOR_EXPORT extern const char kUIEnableZeroCopy[];
COMPOSITOR_EXPORT extern const char kUIShowPaintRects[];
} // namespace switches
@@ -21,7 +21,7 @@ COMPOSITOR_EXPORT extern const char kUIShowPaintRects[];
namespace ui {
COMPOSITOR_EXPORT bool IsUIImplSidePaintingEnabled();
-COMPOSITOR_EXPORT bool IsUIMapImageEnabled();
+COMPOSITOR_EXPORT bool IsUIZeroCopyEnabled();
} // namespace ui