| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |