Commit 0b5fbe3c authored by danakj's avatar danakj Committed by Commit bot

Remove nullchecks for the provider's context.

If the provider is not null, it will have a context that is not null.
The provider is a WebGraphicsContext3DProviderImpl, which is given
a ContextProviderWebContext.

The ContextProviderWebContext is a ContextProviderCommandBuffer, the
factory for which returns a null provider if the underlying context
is null.

Further, the provider comes from RenderThreadImpl's
SharedMainThreadContextProvider(), which will return null if
the provider is null, or if the provider fails to initialize its
GL context.

R=junov@chromium.org, kbr@chromium.org
BUG=584497

Review URL: https://codereview.chromium.org/1813603003

Cr-Commit-Position: refs/heads/master@{#381765}
parent 7812fb8b
...@@ -16,12 +16,10 @@ WebGraphicsContext3DProviderImpl::WebGraphicsContext3DProviderImpl( ...@@ -16,12 +16,10 @@ WebGraphicsContext3DProviderImpl::WebGraphicsContext3DProviderImpl(
WebGraphicsContext3DProviderImpl::~WebGraphicsContext3DProviderImpl() {} WebGraphicsContext3DProviderImpl::~WebGraphicsContext3DProviderImpl() {}
blink::WebGraphicsContext3D* WebGraphicsContext3DProviderImpl::context3d() { blink::WebGraphicsContext3D* WebGraphicsContext3DProviderImpl::context3d() {
DCHECK_EQ(!!provider_->WebContext3D(), !!provider_->ContextGL());
return provider_->WebContext3D(); return provider_->WebContext3D();
} }
gpu::gles2::GLES2Interface* WebGraphicsContext3DProviderImpl::contextGL() { gpu::gles2::GLES2Interface* WebGraphicsContext3DProviderImpl::contextGL() {
DCHECK_EQ(!!provider_->WebContext3D(), !!provider_->ContextGL());
return provider_->ContextGL(); return provider_->ContextGL();
} }
......
...@@ -203,8 +203,6 @@ bool ImageBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platform3 ...@@ -203,8 +203,6 @@ bool ImageBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platform3
if (!provider) if (!provider)
return false; return false;
WebGraphicsContext3D* sharedContext = provider->context3d(); WebGraphicsContext3D* sharedContext = provider->context3d();
if (!sharedContext)
return false;
OwnPtr<WebExternalTextureMailbox> mailbox = adoptPtr(new WebExternalTextureMailbox); OwnPtr<WebExternalTextureMailbox> mailbox = adoptPtr(new WebExternalTextureMailbox);
mailbox->textureSize = WebSize(textureImage->width(), textureImage->height()); mailbox->textureSize = WebSize(textureImage->width(), textureImage->height());
...@@ -249,8 +247,6 @@ bool ImageBuffer::copyRenderingResultsFromDrawingBuffer(DrawingBuffer* drawingBu ...@@ -249,8 +247,6 @@ bool ImageBuffer::copyRenderingResultsFromDrawingBuffer(DrawingBuffer* drawingBu
if (!provider) if (!provider)
return false; return false;
WebGraphicsContext3D* context3D = provider->context3d(); WebGraphicsContext3D* context3D = provider->context3d();
if (!context3D)
return false;
Platform3DObject textureId = m_surface->getBackingTextureHandleForOverwrite(); Platform3DObject textureId = m_surface->getBackingTextureHandleForOverwrite();
if (!textureId) if (!textureId)
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment