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

Side by Side Diff: ui/compositor/compositor.cc

Issue 1379783002: Allow one-copy task tile worker pool to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use memory_efficient_format* settings and revert allocation modifications Created 5 years 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 settings.initial_debug_state.show_replica_screen_space_rects = 134 settings.initial_debug_state.show_replica_screen_space_rects =
135 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); 135 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects);
136 136
137 settings.initial_debug_state.SetRecordRenderingStats( 137 settings.initial_debug_state.SetRecordRenderingStats(
138 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 138 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
139 139
140 settings.use_property_trees = 140 settings.use_property_trees =
141 command_line->HasSwitch(cc::switches::kEnableCompositorPropertyTrees); 141 command_line->HasSwitch(cc::switches::kEnableCompositorPropertyTrees);
142 settings.use_zero_copy = IsUIZeroCopyEnabled(); 142 settings.use_zero_copy = IsUIZeroCopyEnabled();
143 143
144 settings.renderer_settings.use_rgba_4444_textures = 144 settings.renderer_settings.memory_efficient_format =
145 command_line->HasSwitch(switches::kUIEnableRGBA4444Textures); 145 settings.renderer_settings.memory_efficient_format_with_alpha =
146 command_line->HasSwitch(switches::kUIEnableRGBA4444Textures) ?
147 cc::RGBA_4444 : cc::RGBA_8888;
146 148
147 // UI compositor always uses partial raster if not using zero-copy. Zero copy 149 // UI compositor always uses partial raster if not using zero-copy. Zero copy
148 // doesn't currently support partial raster. 150 // doesn't currently support partial raster.
149 settings.use_partial_raster = !settings.use_zero_copy; 151 settings.use_partial_raster = !settings.use_zero_copy;
150 152
151 // Use CPU_READ_WRITE_PERSISTENT memory buffers to support partial tile 153 // Use CPU_READ_WRITE_PERSISTENT memory buffers to support partial tile
152 // raster if needed. 154 // raster if needed.
153 gfx::BufferUsage usage = 155 gfx::BufferUsage usage =
154 settings.use_partial_raster 156 settings.use_partial_raster
155 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT 157 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 observer_list_, 506 observer_list_,
505 OnCompositingLockStateChanged(this)); 507 OnCompositingLockStateChanged(this));
506 } 508 }
507 509
508 void Compositor::CancelCompositorLock() { 510 void Compositor::CancelCompositorLock() {
509 if (compositor_lock_) 511 if (compositor_lock_)
510 compositor_lock_->CancelLock(); 512 compositor_lock_->CancelLock();
511 } 513 }
512 514
513 } // namespace ui 515 } // namespace ui
OLDNEW
« cc/raster/tile_task_worker_pool.cc ('K') | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698