Hide use of TargetConditionals.h behind platform def
It's possible to enable SK_METAL on non-Apple platforms which will lead to compile issues. This will prevent that. Also includes a minor change to keep the decl of GrMtlTextureInfo consistent with other uses. Change-Id: I48ae89b53c3ea8b50ee78383c5a81fdd09e9e3e3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388038 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
1b843bdcb7
commit
45564260d4
@ -19,7 +19,7 @@ typedef const void* GrMTLHandle;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef SK_METAL
|
||||
#ifdef __APPLE__
|
||||
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
@ -59,7 +59,7 @@ struct GrMtlTextureInfo {
|
||||
public:
|
||||
GrMtlTextureInfo() {}
|
||||
|
||||
sk_cfp<const void*> fTexture;
|
||||
sk_cfp<GrMTLHandle> fTexture;
|
||||
|
||||
bool operator==(const GrMtlTextureInfo& that) const {
|
||||
return fTexture == that.fTexture;
|
||||
|
Loading…
Reference in New Issue
Block a user