Reset texture bindings when unlocking discardable textures used by Skia

Before we unlock a discardable texture in CC, we tell Skia to flush
pending IO on the texture. However, this doesn't clear any outstanding
texture bindings involving this texture which Skia has created.
Unfortunately, the act of unlocking in CC does clear these bindings on
the GPU service side, leaving Skia's understanding of GL state incorrect.
This leads to errors if we quickly re-lock this texture and use it in
Skia, as Skia  will assume the texture is still bound, won't re-bind
it, and we'll hit an error when trying to draw.

This change resets Skia's texture bindings whenever we unlock textures,
preventing this scenario.


Bug: 801769
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;
Change-Id: I4cdfa58b6696e95fb40fa7d48a8fec3f09e8398e
Commit-Queue: Khushal <>
Reviewed-by: Khushal <>
Cr-Commit-Position: refs/heads/master@{#529179}
1 file changed