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

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

Issue 17504006: GPU process clients can perform a "shallow" finish. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | 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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 texture_uploader_->ReleaseCachedQueries(); 465 texture_uploader_->ReleaseCachedQueries();
466 } 466 }
467 467
468 void ResourceProvider::Flush() { 468 void ResourceProvider::Flush() {
469 DCHECK(thread_checker_.CalledOnValidThread()); 469 DCHECK(thread_checker_.CalledOnValidThread());
470 WebGraphicsContext3D* context3d = output_surface_->context3d(); 470 WebGraphicsContext3D* context3d = output_surface_->context3d();
471 if (context3d) 471 if (context3d)
472 context3d->flush(); 472 context3d->flush();
473 } 473 }
474 474 //
475 void ResourceProvider::Finish() { 475 //void ResourceProvider::Finish() {
476 DCHECK(thread_checker_.CalledOnValidThread()); 476 // DCHECK(thread_checker_.CalledOnValidThread());
477 WebGraphicsContext3D* context3d = output_surface_->context3d(); 477 // WebGraphicsContext3D* context3d = output_surface_->context3d();
478 if (context3d) 478 // if (context3d)
479 context3d->finish(); 479 // context3d->finish();
480 } 480 //}
481 481
482 bool ResourceProvider::ShallowFlushIfSupported() { 482 bool ResourceProvider::ShallowFlushIfSupported() {
483 DCHECK(thread_checker_.CalledOnValidThread()); 483 DCHECK(thread_checker_.CalledOnValidThread());
484 WebGraphicsContext3D* context3d = output_surface_->context3d(); 484 WebGraphicsContext3D* context3d = output_surface_->context3d();
485 if (!context3d || !use_shallow_flush_) 485 if (!context3d || !use_shallow_flush_)
486 return false; 486 return false;
487 487
488 context3d->shallowFlushCHROMIUM(); 488 context3d->shallowFlushCHROMIUM();
489 return true; 489 return true;
490 } 490 }
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 1408
1409 WebGraphicsContext3D* context3d = output_surface_->context3d(); 1409 WebGraphicsContext3D* context3d = output_surface_->context3d();
1410 DCHECK(context3d); 1410 DCHECK(context3d);
1411 int stride = 0; 1411 int stride = 0;
1412 context3d->getImageParameterivCHROMIUM( 1412 context3d->getImageParameterivCHROMIUM(
1413 resource->image_id, GL_IMAGE_ROWBYTES_CHROMIUM, &stride); 1413 resource->image_id, GL_IMAGE_ROWBYTES_CHROMIUM, &stride);
1414 return stride; 1414 return stride;
1415 } 1415 }
1416 1416
1417 } // namespace cc 1417 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698