Skip to content

Commit c34efe0

Browse files
leizleizSkia Commit-Bot
authored andcommitted
Fix use of undefined TARGET_OS_SIMULATOR for Non-Metal builds.
When skia_use_metal is set to false, there's no TargetConditionals.h include to define TARGET_OS_SIMULATOR, as used in GrGLCaps.cpp. Change-Id: Id6e91cfaa23d8def129a6752356f5ee49d0e5128 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306359 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
1 parent 4866d0a commit c34efe0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gpu/gl/GrGLCaps.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#include "src/gpu/gl/GrGLTexture.h"
2323
#include "src/utils/SkJSONWriter.h"
2424

25+
#if defined(SK_BUILD_FOR_IOS)
26+
#include <TargetConditionals.h>
27+
#endif
28+
2529
GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
2630
const GrGLContextInfo& ctxInfo,
2731
const GrGLInterface* glInterface) : INHERITED(contextOptions) {
@@ -3148,7 +3152,7 @@ void GrGLCaps::setupSampleCounts(const GrGLContextInfo& ctxInfo, const GrGLInter
31483152
// returned by GL so that the array is ascending.
31493153
fFormatTable[i].fColorSampleCounts[0] = 1;
31503154
for (int j = 0; j < count; ++j) {
3151-
#if TARGET_OS_SIMULATOR
3155+
#if defined(SK_BUILD_FOR_IOS) && TARGET_OS_SIMULATOR
31523156
// The iOS simulator is reporting incorrect values for sample counts,
31533157
// so force them to be a power of 2.
31543158
fFormatTable[i].fColorSampleCounts[j+1] = SkPrevPow2(temp[count - j - 1]);

0 commit comments

Comments
 (0)