Compare textureType separately from backend format
Prior CL had assumed GrBackendFormat == incorporated the texture type, since it currently owns that, but that is not the case. So when the texture type comparison was dropped, textures could be batched when they shouldn't have, particularly external vs. 2D. Bug: b/145261411 Change-Id: I9497fc17c7f82b4016cbf1a752f93946615de2dc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257390 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
cdf1bc3bd3
commit
08bd1f7300
@ -149,9 +149,10 @@ GrSamplerState::Filter GrTextureProxy::HighestFilterMode(GrTextureType textureTy
|
|||||||
|
|
||||||
bool GrTextureProxy::ProxiesAreCompatibleAsDynamicState(const GrSurfaceProxy* first,
|
bool GrTextureProxy::ProxiesAreCompatibleAsDynamicState(const GrSurfaceProxy* first,
|
||||||
const GrSurfaceProxy* second) {
|
const GrSurfaceProxy* second) {
|
||||||
// In order to be compatible, the proxies should also have the same texture type, but since
|
// In order to be compatible, the proxies should also have the same texture type. This is
|
||||||
// that is owned by the backend format, the formats being equal is sufficient.
|
// checked explicitly since the GrBackendFormat == operator does not compare texture type
|
||||||
return first->config() == second->config() &&
|
return first->config() == second->config() &&
|
||||||
|
first->backendFormat().textureType() == second->backendFormat().textureType() &&
|
||||||
first->backendFormat() == second->backendFormat();
|
first->backendFormat() == second->backendFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user