| Index: cc/raster/gpu_tile_task_worker_pool.cc
|
| diff --git a/cc/raster/gpu_tile_task_worker_pool.cc b/cc/raster/gpu_tile_task_worker_pool.cc
|
| index 7c21177d5278e9f9ec07eb2ff142a48f6d2d4f3b..d91b404b882c35da225eef631dcc9839d97743d0 100644
|
| --- a/cc/raster/gpu_tile_task_worker_pool.cc
|
| +++ b/cc/raster/gpu_tile_task_worker_pool.cc
|
| @@ -43,13 +43,9 @@ class RasterBufferImpl : public RasterBuffer {
|
| ContextProvider* context_provider = rasterizer_->resource_provider()
|
| ->output_surface()
|
| ->worker_context_provider();
|
| + DCHECK(context_provider);
|
|
|
| - // The context lock must be held while accessing the context on a
|
| - // worker thread.
|
| - base::AutoLock context_lock(*context_provider->GetLock());
|
| -
|
| - // Allow this worker thread to bind to context_provider.
|
| - context_provider->DetachFromThread();
|
| + ContextProvider::ScopedContextGL scoped_context(context_provider);
|
|
|
| gfx::Rect playback_rect = raster_full_rect;
|
| if (resource_has_previous_content_) {
|
| @@ -64,10 +60,7 @@ class RasterBufferImpl : public RasterBuffer {
|
| playback_rect, scale);
|
|
|
| // Barrier to sync worker context output to cc context.
|
| - context_provider->ContextGL()->OrderingBarrierCHROMIUM();
|
| -
|
| - // Allow compositor thread to bind to context_provider.
|
| - context_provider->DetachFromThread();
|
| + scoped_context.ContextGL()->OrderingBarrierCHROMIUM();
|
| }
|
|
|
| private:
|
|
|