Allow mock GrContexts to "support" shader derivatives
Change-Id: I0d8dce5e0873a058b59baae9c35903b2444a76fd Reviewed-on: https://skia-review.googlesource.com/68480 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
9eccfff674
commit
821ef188b3
@ -16,8 +16,8 @@ struct GrMockTextureInfo {
|
||||
|
||||
/**
|
||||
* A pointer to this type is used as the GrBackendContext when creating a Mock GrContext. It can be
|
||||
* used to specificy capability options for the mock context. If nullptr is used a default
|
||||
* constructed GrMockOptions is used.
|
||||
* used to specify capability options for the mock context. If nullptr is used a default constructed
|
||||
* GrMockOptions is used.
|
||||
*/
|
||||
struct GrMockOptions {
|
||||
GrMockOptions() {
|
||||
@ -48,6 +48,7 @@ struct GrMockOptions {
|
||||
bool fIntegerSupport = false;
|
||||
bool fFlatInterpolationSupport = false;
|
||||
int fMaxVertexSamplers = 0;
|
||||
bool fShaderDerivativeSupport = true;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
fShaderCaps->fIntegerSupport = options.fIntegerSupport;
|
||||
fShaderCaps->fFlatInterpolationSupport = options.fFlatInterpolationSupport;
|
||||
fShaderCaps->fMaxVertexSamplers = options.fMaxVertexSamplers;
|
||||
fShaderCaps->fShaderDerivativeSupport = options.fShaderDerivativeSupport;
|
||||
|
||||
this->applyOptionsOverrides(contextOptions);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user