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

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

Issue 1713503002: Reland Allow one-copy and zero-copy task tile worker pools to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 settings.initial_debug_state.show_screen_space_rects = 139 settings.initial_debug_state.show_screen_space_rects =
140 command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects); 140 command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects);
141 settings.initial_debug_state.show_replica_screen_space_rects = 141 settings.initial_debug_state.show_replica_screen_space_rects =
142 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); 142 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects);
143 143
144 settings.initial_debug_state.SetRecordRenderingStats( 144 settings.initial_debug_state.SetRecordRenderingStats(
145 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 145 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
146 146
147 settings.use_zero_copy = IsUIZeroCopyEnabled(); 147 settings.use_zero_copy = IsUIZeroCopyEnabled();
148 148
149 settings.renderer_settings.use_rgba_4444_textures = 149 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures))
150 command_line->HasSwitch(switches::kUIEnableRGBA4444Textures); 150 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444;
151 151
152 // UI compositor always uses partial raster if not using zero-copy. Zero copy 152 // UI compositor always uses partial raster if not using zero-copy. Zero copy
153 // doesn't currently support partial raster. 153 // doesn't currently support partial raster.
154 settings.use_partial_raster = !settings.use_zero_copy; 154 settings.use_partial_raster = !settings.use_zero_copy;
155 155
156 // Use CPU_READ_WRITE_PERSISTENT memory buffers to support partial tile 156 // Use CPU_READ_WRITE_PERSISTENT memory buffers to support partial tile
157 // raster if needed. 157 // raster if needed.
158 gfx::BufferUsage usage = 158 gfx::BufferUsage usage =
159 settings.use_partial_raster 159 settings.use_partial_raster
160 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT 160 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 observer_list_, 522 observer_list_,
523 OnCompositingLockStateChanged(this)); 523 OnCompositingLockStateChanged(this));
524 } 524 }
525 525
526 void Compositor::CancelCompositorLock() { 526 void Compositor::CancelCompositorLock() {
527 if (compositor_lock_) 527 if (compositor_lock_)
528 compositor_lock_->CancelLock(); 528 compositor_lock_->CancelLock();
529 } 529 }
530 530
531 } // namespace ui 531 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698