Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: ui/compositor/compositor.cc

Issue 1381163002: Add a flag to disable partial raster in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback + UT refactoring Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/fake_compositor_dependencies.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index e648c8aa67c53daf9d790060d96c241247512cd0..35a29108c9559f72e0502238ccb3125525334a42 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -140,10 +140,14 @@ Compositor::Compositor(ui::ContextFactory* context_factory,
settings.renderer_settings.use_rgba_4444_textures =
command_line->HasSwitch(switches::kUIEnableRGBA4444Textures);
- // Use PERSISTENT_MAP memory buffers to support partial tile raster for
- // software raster into GpuMemoryBuffers.
- gfx::BufferUsage usage = gfx::BufferUsage::PERSISTENT_MAP;
- settings.use_persistent_map_for_gpu_memory_buffers = true;
+ // UI compositor always uses partial raster if not using zero-copy. Zero copy
+ // doesn't currently support partial raster.
+ settings.use_partial_raster = !settings.use_zero_copy;
+
+ // Use PERSISTENT_MAP memory buffers to support partial tile raster if needed.
+ gfx::BufferUsage usage = settings.use_partial_raster
+ ? gfx::BufferUsage::PERSISTENT_MAP
+ : gfx::BufferUsage::MAP;
for (size_t format = 0;
format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) {
« no previous file with comments | « content/test/fake_compositor_dependencies.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698