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

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

Issue 135753006: cc: Delete ContextProvider::MakeGrContextCurrent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deleted GR_GL_PER_GL_FUNC_CALLBACK guard Created 6 years, 11 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
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/test/test_context_provider.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/raster_worker_pool.h" 5 #include "cc/resources/raster_worker_pool.h"
6 6
7 #include "base/debug/trace_event_synthetic_delay.h" 7 #include "base/debug/trace_event_synthetic_delay.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 internal::RasterWorkerPoolTask* task) const { 609 internal::RasterWorkerPoolTask* task) const {
610 return 610 return
611 raster_tasks_required_for_activation_.find(task) != 611 raster_tasks_required_for_activation_.find(task) !=
612 raster_tasks_required_for_activation_.end(); 612 raster_tasks_required_for_activation_.end();
613 } 613 }
614 614
615 void RasterWorkerPool::RunGpuRasterTasks(const RasterTaskVector& tasks) { 615 void RasterWorkerPool::RunGpuRasterTasks(const RasterTaskVector& tasks) {
616 if (tasks.empty()) 616 if (tasks.empty())
617 return; 617 return;
618 618
619 context_provider_->MakeGrContextCurrent();
620
621 GrContext* gr_context = context_provider_->GrContext(); 619 GrContext* gr_context = context_provider_->GrContext();
622 // TODO(alokp): Implement TestContextProvider::GrContext(). 620 // TODO(alokp): Implement TestContextProvider::GrContext().
623 if (gr_context) 621 if (gr_context)
624 gr_context->resetContext(); 622 gr_context->resetContext();
625 623
626 for (RasterTaskVector::const_iterator it = tasks.begin(); 624 for (RasterTaskVector::const_iterator it = tasks.begin();
627 it != tasks.end(); ++it) { 625 it != tasks.end(); ++it) {
628 internal::RasterWorkerPoolTask* task = it->get(); 626 internal::RasterWorkerPoolTask* task = it->get();
629 DCHECK(task->use_gpu_rasterization()); 627 DCHECK(task->use_gpu_rasterization());
630 628
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 728
731 internal::GraphNode* decode_node = CreateGraphNodeForTask( 729 internal::GraphNode* decode_node = CreateGraphNodeForTask(
732 decode_task, priority, graph); 730 decode_task, priority, graph);
733 decode_node->add_dependent(raster_node); 731 decode_node->add_dependent(raster_node);
734 } 732 }
735 733
736 return raster_node; 734 return raster_node;
737 } 735 }
738 736
739 } // namespace cc 737 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/test/test_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698