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

Side by Side Diff: cc/resources/resource_provider.cc

Issue 14273026: cc: Make async readback path use async glRreadPixels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/resources/resource_provider.h" 5 #include "cc/resources/resource_provider.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 8
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 texture_uploader_->ReleaseCachedQueries(); 438 texture_uploader_->ReleaseCachedQueries();
439 } 439 }
440 440
441 void ResourceProvider::Flush() { 441 void ResourceProvider::Flush() {
442 DCHECK(thread_checker_.CalledOnValidThread()); 442 DCHECK(thread_checker_.CalledOnValidThread());
443 WebGraphicsContext3D* context3d = output_surface_->context3d(); 443 WebGraphicsContext3D* context3d = output_surface_->context3d();
444 if (context3d) 444 if (context3d)
445 context3d->flush(); 445 context3d->flush();
446 } 446 }
447 447
448 void ResourceProvider::Finish() {
449 DCHECK(thread_checker_.CalledOnValidThread());
450 WebGraphicsContext3D* context3d = output_surface_->context3d();
451 if (context3d)
452 context3d->finish();
453 }
454
448 bool ResourceProvider::ShallowFlushIfSupported() { 455 bool ResourceProvider::ShallowFlushIfSupported() {
449 DCHECK(thread_checker_.CalledOnValidThread()); 456 DCHECK(thread_checker_.CalledOnValidThread());
450 WebGraphicsContext3D* context3d = output_surface_->context3d(); 457 WebGraphicsContext3D* context3d = output_surface_->context3d();
451 if (!context3d || !use_shallow_flush_) 458 if (!context3d || !use_shallow_flush_)
452 return false; 459 return false;
453 460
454 context3d->shallowFlushCHROMIUM(); 461 context3d->shallowFlushCHROMIUM();
455 return true; 462 return true;
456 } 463 }
457 464
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 void ResourceProvider::EnableReadLockFences(ResourceProvider::ResourceId id, 1235 void ResourceProvider::EnableReadLockFences(ResourceProvider::ResourceId id,
1229 bool enable) { 1236 bool enable) {
1230 DCHECK(thread_checker_.CalledOnValidThread()); 1237 DCHECK(thread_checker_.CalledOnValidThread());
1231 ResourceMap::iterator it = resources_.find(id); 1238 ResourceMap::iterator it = resources_.find(id);
1232 CHECK(it != resources_.end()); 1239 CHECK(it != resources_.end());
1233 Resource* resource = &it->second; 1240 Resource* resource = &it->second;
1234 resource->enable_read_lock_fences = enable; 1241 resource->enable_read_lock_fences = enable;
1235 } 1242 }
1236 1243
1237 } // namespace cc 1244 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698