Index: cc/resource_update_controller.cc |
diff --git a/cc/resource_update_controller.cc b/cc/resource_update_controller.cc |
index 1177d5372fcaa69b0d8012bf20243bdc572c23e9..b65c11772a6912ebe94bafbfd13a9b8588f605ad 100644 |
--- a/cc/resource_update_controller.cc |
+++ b/cc/resource_update_controller.cc |
@@ -13,12 +13,10 @@ |
#include "cc/thread.h" |
#include "skia/ext/refptr.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" |
-#include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsContext3D.h" |
#include "third_party/khronos/GLES2/gl2.h" |
#include "third_party/skia/include/gpu/SkGpuDevice.h" |
using WebKit::WebGraphicsContext3D; |
-using WebKit::WebSharedGraphicsContext3D; |
namespace { |
@@ -124,19 +122,20 @@ void ResourceUpdateController::updateTexture(ResourceUpdate update) |
gfx::Rect sourceRect = update.source_rect; |
gfx::Vector2d destOffset = update.dest_offset; |
+ WebGraphicsContext3D* paintContext = m_resourceProvider->offscreenGraphicsContext3d(); |
+ if (!paintContext) |
+ return; |
+ |
+ GrContext* paintGrContext = m_resourceProvider->offscreenGrContext(); |
+ if (!paintGrContext) |
+ return; |
+ |
texture->acquireBackingTexture(m_resourceProvider); |
DCHECK(texture->haveBackingTexture()); |
DCHECK(m_resourceProvider->resourceType(texture->resourceId()) == |
ResourceProvider::GLTexture); |
- WebGraphicsContext3D* paintContext = m_hasImplThread ? |
- WebSharedGraphicsContext3D::compositorThreadContext() : |
- WebSharedGraphicsContext3D::mainThreadContext(); |
- GrContext* paintGrContext = m_hasImplThread ? |
- WebSharedGraphicsContext3D::compositorThreadGrContext() : |
- WebSharedGraphicsContext3D::mainThreadGrContext(); |
- |
// Flush the context in which the backing texture is created so that it |
// is available in other shared contexts. It is important to do here |
// because the backing texture is created in one context while it is |