[//gpu] Always tex and bind in CopySIDirectlyToGLTextureViaTextureCopy

CopySIDirectlyToGLTexture() currently tex+binds the input texture in the
case where:

* It is copying a subtexture via the GL interface
* It is copying via the raster interface

It doesn't do so when copying a *texture* via the GL interface, as the
service-side implementation in that case semantically does that.

We want to move this logic to be the responsibility of the caller, but
we don't want them to have to be aware of *how* the implementation is
doing the copy.

To prepare, this CL has
CopySharedImageDirectlyToGLTextureViaTextureCopy() always take the
"copy via CopySubTexture()" path. This is functionally equivalent to
the current flow, but might be sacrificing performance optimization in
the case where the texture could be copied via CopyTextureCHROMIUM().
Hence, we make the change under a killswitch.

Once the killswitch rolls out, we'll be able to unify the two tex+bind
flows to happen at the top of CopySIDirectlyToGLTexture() (as well as
in CopySharedImageDirectlyToGLTextureViaTextureCopy()'s other direct
callsites in PaintCanvasVideoRenderer), followed by moving the tex+bind
call out of CopySIDirectlyToGLTexture() to its callsite.

Bug: 343011436
Change-Id: I201ba30f778d2a728820d5f08743b1c5b6b69a6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7703554
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1606929}
NOKEYCHECK=True
GitOrigin-RevId: 1b9669aea0b85a553c4e3a8417de901f77127832
1 file changed