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

Unified Diff: cc/resources/pixel_buffer_raster_worker_pool.cc

Issue 375303002: cc: Refactor ResourceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing typing error in build.gn Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.h ('k') | cc/resources/raster_worker_pool_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/pixel_buffer_raster_worker_pool.cc
diff --git a/cc/resources/pixel_buffer_raster_worker_pool.cc b/cc/resources/pixel_buffer_raster_worker_pool.cc
index 1df2362a5aee337a1e3a5219e32274fc859ef3da..7b5c6cf2fb466c3e44cd729221da58e5ae315148 100644
--- a/cc/resources/pixel_buffer_raster_worker_pool.cc
+++ b/cc/resources/pixel_buffer_raster_worker_pool.cc
@@ -10,6 +10,7 @@
#include "base/debug/trace_event.h"
#include "cc/debug/traced_value.h"
#include "cc/resources/resource.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
namespace cc {
namespace {
@@ -27,11 +28,13 @@ typedef base::StackVector<RasterTask*, kMaxScheduledRasterTasks>
scoped_ptr<RasterWorkerPool> PixelBufferRasterWorkerPool::Create(
base::SequencedTaskRunner* task_runner,
TaskGraphRunner* task_graph_runner,
+ ContextProvider* context_provider,
ResourceProvider* resource_provider,
size_t max_transfer_buffer_usage_bytes) {
return make_scoped_ptr<RasterWorkerPool>(
new PixelBufferRasterWorkerPool(task_runner,
task_graph_runner,
+ context_provider,
resource_provider,
max_transfer_buffer_usage_bytes));
}
@@ -39,11 +42,13 @@ scoped_ptr<RasterWorkerPool> PixelBufferRasterWorkerPool::Create(
PixelBufferRasterWorkerPool::PixelBufferRasterWorkerPool(
base::SequencedTaskRunner* task_runner,
TaskGraphRunner* task_graph_runner,
+ ContextProvider* context_provider,
ResourceProvider* resource_provider,
size_t max_transfer_buffer_usage_bytes)
: task_runner_(task_runner),
task_graph_runner_(task_graph_runner),
namespace_token_(task_graph_runner->GetNamespaceToken()),
+ context_provider_(context_provider),
resource_provider_(resource_provider),
shutdown_(false),
scheduled_raster_task_count_(0u),
@@ -315,7 +320,8 @@ void PixelBufferRasterWorkerPool::FlushUploads() {
if (!has_performed_uploads_since_last_flush_)
return;
- resource_provider_->ShallowFlushIfSupported();
+ if (context_provider_)
+ context_provider_->ContextGL()->ShallowFlushCHROMIUM();
has_performed_uploads_since_last_flush_ = false;
}
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.h ('k') | cc/resources/raster_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698