diff options
author | 2017-12-08 15:31:34 -0800 | |
---|---|---|
committer | 2017-12-09 01:31:48 +0000 | |
commit | 42b6cffaad4897d1d5a45bf9087a3b1a881591f4 (patch) | |
tree | ba4b941c0c6909a423906061950b8e1bd023922b /include | |
parent | 0933bc9b679457ef9333988fe3a1faae6a0b4126 (diff) |
Fix tautological compare in GrSurfaceProxy.cpp
-1 is not a valid value for the GrSurfaceOrigin enum, and certain
versions of Clang warn that the comparison is effectively a no-op:
../../third_party/skia/src/gpu/GrSurfaceProxy.cpp:547:38: warning: comparison
of constant -1 with expression of type 'GrSurfaceOrigin' is always true
[-Wtautological-constant-out-of-range-compare]
SkASSERT(kGrUnknownSurfaceOrigin != fProxy->origin());
~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
Instead of trying to force -1 in there, drop the assert and initialize with
top-left as origin.
Bug: chromium:793189
Change-Id: I4cb6720d567f6c5650a19df33d3c77f2d738a516
Reviewed-on: https://skia-review.googlesource.com/82961
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/private/GrTypesPriv.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h index 2da1f86b19..a3e9014f47 100644 --- a/include/private/GrTypesPriv.h +++ b/include/private/GrTypesPriv.h @@ -24,8 +24,6 @@ using GrStdSteadyClock = std::chrono::monotonic_clock; using GrStdSteadyClock = std::chrono::steady_clock; #endif -static constexpr GrSurfaceOrigin kGrUnknownSurfaceOrigin = static_cast<GrSurfaceOrigin>(-1); - /** This enum is used to specify the load operation to be used when an * opList/GrGpuCommandBuffer begins execution. */ |