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

Side by Side Diff: cc/raster/gpu_raster_buffer_provider.cc

Issue 2161933004: Re-enable GPU partial raster for non-MSAA content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perftest
Patch Set: Created 4 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 | « no previous file | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/raster/gpu_raster_buffer_provider.h" 5 #include "cc/raster/gpu_raster_buffer_provider.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 return resource_provider_->best_render_buffer_format(); 219 return resource_provider_->best_render_buffer_format();
220 } 220 }
221 221
222 bool GpuRasterBufferProvider::IsResourceSwizzleRequired( 222 bool GpuRasterBufferProvider::IsResourceSwizzleRequired(
223 bool must_support_alpha) const { 223 bool must_support_alpha) const {
224 // This doesn't require a swizzle because we rasterize to the correct format. 224 // This doesn't require a swizzle because we rasterize to the correct format.
225 return false; 225 return false;
226 } 226 }
227 227
228 bool GpuRasterBufferProvider::CanPartialRasterIntoProvidedResource() const { 228 bool GpuRasterBufferProvider::CanPartialRasterIntoProvidedResource() const {
229 return false; 229 // Partial raster doesn't support MSAA, as the MSAA resolve is unaware of clip
230 // rects.
231 // TODO(crbug.com/629683): See if we can work around this limitation.
232 return msaa_sample_count_ == 0;
230 } 233 }
231 234
232 void GpuRasterBufferProvider::Shutdown() { 235 void GpuRasterBufferProvider::Shutdown() {
233 pending_raster_buffers_.clear(); 236 pending_raster_buffers_.clear();
234 } 237 }
235 238
236 void GpuRasterBufferProvider::PlaybackOnWorkerThread( 239 void GpuRasterBufferProvider::PlaybackOnWorkerThread(
237 ResourceProvider::ScopedWriteLockGL* resource_lock, 240 ResourceProvider::ScopedWriteLockGL* resource_lock,
238 const gpu::SyncToken& sync_token, 241 const gpu::SyncToken& sync_token,
239 bool resource_has_previous_content, 242 bool resource_has_previous_content,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 gl->OrderingBarrierCHROMIUM(); 280 gl->OrderingBarrierCHROMIUM();
278 281
279 // Generate sync token after the barrier for cross context synchronization. 282 // Generate sync token after the barrier for cross context synchronization.
280 gpu::SyncToken resource_sync_token; 283 gpu::SyncToken resource_sync_token;
281 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); 284 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData());
282 resource_lock->set_sync_token(resource_sync_token); 285 resource_lock->set_sync_token(resource_sync_token);
283 resource_lock->set_synchronized(!async_worker_context_enabled_); 286 resource_lock->set_synchronized(!async_worker_context_enabled_);
284 } 287 }
285 288
286 } // namespace cc 289 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698