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; |
} |