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

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

Issue 2677893003: cc: Add color conversion support to all DrawQuad types (Closed)
Patch Set: Update w/2681223002 Created 3 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
« cc/output/gl_renderer.h ('K') | « cc/output/shader.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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) 157 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures))
158 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; 158 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444;
159 159
160 settings.use_layer_lists = 160 settings.use_layer_lists =
161 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); 161 command_line->HasSwitch(cc::switches::kUIEnableLayerLists);
162 162
163 settings.enable_color_correct_rendering = 163 settings.enable_color_correct_rendering =
164 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering) || 164 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering) ||
165 command_line->HasSwitch(cc::switches::kEnableTrueColorRendering); 165 command_line->HasSwitch(cc::switches::kEnableTrueColorRendering);
166 settings.renderer_settings.enable_color_correct_rendering =
167 settings.enable_color_correct_rendering;
166 168
167 // UI compositor always uses partial raster if not using zero-copy. Zero copy 169 // UI compositor always uses partial raster if not using zero-copy. Zero copy
168 // doesn't currently support partial raster. 170 // doesn't currently support partial raster.
169 settings.use_partial_raster = !settings.use_zero_copy; 171 settings.use_partial_raster = !settings.use_zero_copy;
170 172
171 // Populate buffer_to_texture_target_map for all buffer usage/formats. 173 // Populate buffer_to_texture_target_map for all buffer usage/formats.
172 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); 174 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST);
173 ++usage_idx) { 175 ++usage_idx) {
174 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); 176 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx);
175 for (int format_idx = 0; 177 for (int format_idx = 0;
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 for (auto& observer : observer_list_) 559 for (auto& observer : observer_list_)
558 observer.OnCompositingLockStateChanged(this); 560 observer.OnCompositingLockStateChanged(this);
559 } 561 }
560 562
561 void Compositor::CancelCompositorLock() { 563 void Compositor::CancelCompositorLock() {
562 if (compositor_lock_) 564 if (compositor_lock_)
563 compositor_lock_->CancelLock(); 565 compositor_lock_->CancelLock();
564 } 566 }
565 567
566 } // namespace ui 568 } // namespace ui
OLDNEW
« cc/output/gl_renderer.h ('K') | « cc/output/shader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698