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

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

Issue 1139063002: cc: Partial tile update for one-copy raster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: monocle: slightlylessstruct Created 5 years, 6 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
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 settings.use_one_copy = IsUIOneCopyEnabled(); 135 settings.use_one_copy = IsUIOneCopyEnabled();
136 136
137 // TODO(reveman): We currently assume that the compositor will use BGRA_8888 137 // TODO(reveman): We currently assume that the compositor will use BGRA_8888
138 // if it's able to, and RGBA_8888 otherwise. Since we don't know what it will 138 // if it's able to, and RGBA_8888 otherwise. Since we don't know what it will
139 // use we hardcode BGRA_8888 here for now. We should instead 139 // use we hardcode BGRA_8888 here for now. We should instead
140 // move decisions about GpuMemoryBuffer format to the browser embedder so we 140 // move decisions about GpuMemoryBuffer format to the browser embedder so we
141 // know it here, and pass that decision to the compositor for each usage. 141 // know it here, and pass that decision to the compositor for each usage.
142 // crbug.com/490362 142 // crbug.com/490362
143 gfx::GpuMemoryBuffer::Format format = gfx::GpuMemoryBuffer::BGRA_8888; 143 gfx::GpuMemoryBuffer::Format format = gfx::GpuMemoryBuffer::BGRA_8888;
144 144
145 gfx::GpuMemoryBuffer::Usage usage = gfx::GpuMemoryBuffer::MAP;
146 // TODO(danakj): Do this for partial raster:
147 // Use PERSISTENT_MAP memory buffers to support partial tile raster for 145 // Use PERSISTENT_MAP memory buffers to support partial tile raster for
148 // software raster into GpuMemoryBuffers. 146 // software raster into GpuMemoryBuffers.
149 // gfx::GpuMemoryBuffer::Usage usage = gfx::GpuMemoryBuffer::PERSISTENT_MAP; 147 gfx::GpuMemoryBuffer::Usage usage = gfx::GpuMemoryBuffer::PERSISTENT_MAP;
150 // settings.use_persistent_map_gpu_memory_buffer_usage = true; 148 settings.use_persistent_map_gpu_memory_buffer_usage = true;
151 149
152 settings.use_image_texture_target = 150 settings.use_image_texture_target =
153 context_factory_->GetImageTextureTarget(format, usage); 151 context_factory_->GetImageTextureTarget(format, usage);
154 152
155 // Note: gathering of pixel refs is only needed when using multiple 153 // Note: gathering of pixel refs is only needed when using multiple
156 // raster threads. 154 // raster threads.
157 settings.gather_pixel_refs = false; 155 settings.gather_pixel_refs = false;
158 156
159 base::TimeTicks before_create = base::TimeTicks::Now(); 157 base::TimeTicks before_create = base::TimeTicks::Now();
160 158
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 observer_list_, 457 observer_list_,
460 OnCompositingLockStateChanged(this)); 458 OnCompositingLockStateChanged(this));
461 } 459 }
462 460
463 void Compositor::CancelCompositorLock() { 461 void Compositor::CancelCompositorLock() {
464 if (compositor_lock_) 462 if (compositor_lock_)
465 compositor_lock_->CancelLock(); 463 compositor_lock_->CancelLock();
466 } 464 }
467 465
468 } // namespace ui 466 } // namespace ui
OLDNEW
« cc/tiles/picture_layer_tiling.cc ('K') | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698