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

Side by Side 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: Remove "--enable-persistent-gpu-memory-buffer" 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); 133 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects);
134 134
135 settings.initial_debug_state.SetRecordRenderingStats( 135 settings.initial_debug_state.SetRecordRenderingStats(
136 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 136 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
137 137
138 settings.use_zero_copy = IsUIZeroCopyEnabled(); 138 settings.use_zero_copy = IsUIZeroCopyEnabled();
139 139
140 settings.renderer_settings.use_rgba_4444_textures = 140 settings.renderer_settings.use_rgba_4444_textures =
141 command_line->HasSwitch(switches::kUIEnableRGBA4444Textures); 141 command_line->HasSwitch(switches::kUIEnableRGBA4444Textures);
142 142
143 // Use PERSISTENT_MAP memory buffers to support partial tile raster for 143 // UI compositor always uses partial raster. Use PERSISTENT_MAP memory buffers
danakj 2015/10/08 15:18:43 aside: i guess we shouldn't do this if use_zero_co
ericrk 2015/10/13 23:03:45 Added some more logic here to handle this case.
144 // software raster into GpuMemoryBuffers. 144 // to support partial tile raster for software raster into GpuMemoryBuffers.
145 settings.use_partial_raster = true;
145 gfx::BufferUsage usage = gfx::BufferUsage::PERSISTENT_MAP; 146 gfx::BufferUsage usage = gfx::BufferUsage::PERSISTENT_MAP;
146 settings.use_persistent_map_for_gpu_memory_buffers = true;
147 147
148 for (size_t format = 0; 148 for (size_t format = 0;
149 format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) { 149 format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) {
150 DCHECK_GT(settings.use_image_texture_targets.size(), format); 150 DCHECK_GT(settings.use_image_texture_targets.size(), format);
151 settings.use_image_texture_targets[format] = 151 settings.use_image_texture_targets[format] =
152 context_factory_->GetImageTextureTarget( 152 context_factory_->GetImageTextureTarget(
153 static_cast<gfx::BufferFormat>(format), usage); 153 static_cast<gfx::BufferFormat>(format), usage);
154 } 154 }
155 155
156 // Note: Only enable image decode tasks if we have more than one worker 156 // Note: Only enable image decode tasks if we have more than one worker
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 observer_list_, 487 observer_list_,
488 OnCompositingLockStateChanged(this)); 488 OnCompositingLockStateChanged(this));
489 } 489 }
490 490
491 void Compositor::CancelCompositorLock() { 491 void Compositor::CancelCompositorLock() {
492 if (compositor_lock_) 492 if (compositor_lock_)
493 compositor_lock_->CancelLock(); 493 compositor_lock_->CancelLock();
494 } 494 }
495 495
496 } // namespace ui 496 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698