aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Bruce Dawson <brucedawson@google.com>2017-07-05 14:30:20 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-06 19:24:36 +0000
commit71479b7922d693f4bea5b5985d0422d4567994fc (patch)
treeef4da48a238cbc00073bd23ce5a06e1b2d0ec03b /src/gpu
parent39e085559ddbd088866abdf50a48f7ab5b283830 (diff)
Fix missing height check found by /analyze
A recent run of the experimental VC++ /analyze builder gave this warning: skia\src\gpu\gl\grglgpu.cpp(851) : warning C6287: Redundant code: the left and right sub-expressions are identical. The code it complained about was this: if (width < 0 || width < 0) { which was introduced in https://skia-review.googlesource.com/c/20445/ This change makes the obvious fix. Change-Id: I9d1743293fac9dd15ed82cf85efef907d727921e Reviewed-on: https://skia-review.googlesource.com/21620 Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Bruce Dawson <brucedawson@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/gl/GrGLGpu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 861542fd1d..bcc74af29a 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -848,7 +848,7 @@ bool GrGLGpu::onTransferPixels(GrTexture* texture,
rowBytes = trimRowBytes;
}
const void* pixels = (void*)offset;
- if (width < 0 || width < 0) {
+ if (width < 0 || height < 0) {
return false;
}