Fix NULL ptr with short-lived TextureImageTransportSurfaces
When the surface is created from GpuCommandBufferStub, it is made current for the very first time while helper_->stub()->decoder()->GetGLContext() returns NULL (see order in GpuCommandBufferStub::OnInitialize()). If we then handle drawing and swapping of a frame while a) the context is still current and we avoid calling Surface::OnMakeCurrent() again b) the surface is destroyed right after with the ack pending, it is possible for context_ to be NULL in BufferPresentedImpl. With virtual contexts, this patch causes us to hold a reference to the real GL context instead now, which is fine because we only need the context to delete the backbuffer texture during destruction. BUG=169429 Review URL: https://codereview.chromium.org/12252028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182403 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment