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

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

Issue 2110083004: Partial raster for GPU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@partialuma2
Patch Set: hi 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/resources/resource_pool.h » ('j') | cc/resources/resource_pool.cc » ('J')
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/one_copy_raster_buffer_provider.h" 5 #include "cc/raster/one_copy_raster_buffer_provider.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 return resource_provider_->best_texture_format(); 148 return resource_provider_->best_texture_format();
149 } 149 }
150 150
151 bool OneCopyRasterBufferProvider::IsResourceSwizzleRequired( 151 bool OneCopyRasterBufferProvider::IsResourceSwizzleRequired(
152 bool must_support_alpha) const { 152 bool must_support_alpha) const {
153 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); 153 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
154 } 154 }
155 155
156 bool OneCopyRasterBufferProvider::IsPartialRasterSupported() const { 156 bool OneCopyRasterBufferProvider::IsPartialRasterSupported() const {
157 return true; 157 return false;
ericrk 2016/07/11 18:55:29 One copy doesn't support partial raster into a buf
enne (OOO) 2016/07/11 21:16:24 I'm not sure I know what the best answer is, but I
ericrk 2016/07/12 17:31:56 Renamed this function to hopefully be clearer.
158 } 158 }
159 159
160 void OneCopyRasterBufferProvider::Shutdown() { 160 void OneCopyRasterBufferProvider::Shutdown() {
161 staging_pool_.Shutdown(); 161 staging_pool_.Shutdown();
162 pending_raster_buffers_.clear(); 162 pending_raster_buffers_.clear();
163 } 163 }
164 164
165 void OneCopyRasterBufferProvider::PlaybackAndCopyOnWorkerThread( 165 void OneCopyRasterBufferProvider::PlaybackAndCopyOnWorkerThread(
166 const Resource* resource, 166 const Resource* resource,
167 ResourceProvider::ScopedWriteLockGL* resource_lock, 167 ResourceProvider::ScopedWriteLockGL* resource_lock,
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 gl->OrderingBarrierCHROMIUM(); 374 gl->OrderingBarrierCHROMIUM();
375 375
376 // Generate sync token after the barrier for cross context synchronization. 376 // Generate sync token after the barrier for cross context synchronization.
377 gpu::SyncToken resource_sync_token; 377 gpu::SyncToken resource_sync_token;
378 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); 378 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData());
379 resource_lock->set_sync_token(resource_sync_token); 379 resource_lock->set_sync_token(resource_sync_token);
380 resource_lock->set_synchronized(!async_worker_context_enabled_); 380 resource_lock->set_synchronized(!async_worker_context_enabled_);
381 } 381 }
382 382
383 } // namespace cc 383 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/resource_pool.h » ('j') | cc/resources/resource_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698