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

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

Issue 1227163017: cc: one copy is default as well as final fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 5 years, 5 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/test/fake_compositor_dependencies.cc ('k') | ui/compositor/compositor_switches.h » ('j') | 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 <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects); 118 command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects);
119 settings.initial_debug_state.show_replica_screen_space_rects = 119 settings.initial_debug_state.show_replica_screen_space_rects =
120 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); 120 command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects);
121 121
122 settings.initial_debug_state.SetRecordRenderingStats( 122 settings.initial_debug_state.SetRecordRenderingStats(
123 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 123 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
124 124
125 settings.use_display_lists = true; 125 settings.use_display_lists = true;
126 126
127 settings.use_zero_copy = IsUIZeroCopyEnabled(); 127 settings.use_zero_copy = IsUIZeroCopyEnabled();
128 settings.use_one_copy = IsUIOneCopyEnabled();
129 128
130 // TODO(reveman): We currently assume that the compositor will use BGRA_8888 129 // TODO(reveman): We currently assume that the compositor will use BGRA_8888
131 // if it's able to, and RGBA_8888 otherwise. Since we don't know what it will 130 // if it's able to, and RGBA_8888 otherwise. Since we don't know what it will
132 // use we hardcode BGRA_8888 here for now. We should instead 131 // use we hardcode BGRA_8888 here for now. We should instead
133 // move decisions about GpuMemoryBuffer format to the browser embedder so we 132 // move decisions about GpuMemoryBuffer format to the browser embedder so we
134 // know it here, and pass that decision to the compositor for each usage. 133 // know it here, and pass that decision to the compositor for each usage.
135 // crbug.com/490362 134 // crbug.com/490362
136 gfx::GpuMemoryBuffer::Format format = gfx::GpuMemoryBuffer::BGRA_8888; 135 gfx::GpuMemoryBuffer::Format format = gfx::GpuMemoryBuffer::BGRA_8888;
137 136
138 // Use PERSISTENT_MAP memory buffers to support partial tile raster for 137 // Use PERSISTENT_MAP memory buffers to support partial tile raster for
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 observer_list_, 447 observer_list_,
449 OnCompositingLockStateChanged(this)); 448 OnCompositingLockStateChanged(this));
450 } 449 }
451 450
452 void Compositor::CancelCompositorLock() { 451 void Compositor::CancelCompositorLock() {
453 if (compositor_lock_) 452 if (compositor_lock_)
454 compositor_lock_->CancelLock(); 453 compositor_lock_->CancelLock();
455 } 454 }
456 455
457 } // namespace ui 456 } // namespace ui
OLDNEW
« no previous file with comments | « content/test/fake_compositor_dependencies.cc ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698