Caching the result of readPixelsSupported
authorpiotaixr <piotaixr@chromium.org>
Wed, 16 Jul 2014 02:41:08 +0000 (19:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 16 Jul 2014 02:41:08 +0000 (19:41 -0700)
commit8339371f1ec3c57a0741932fd96bff32c53d4e54
tree0b55a2a35986e75941aa517b62892c40c6ac553b
parente51b6bd1f9910b676e26c9db930d25c651c96c71
Caching the result of readPixelsSupported

The call was calling GR_GL_GetIntegerv 2 times for each readPixels
and thus was causing a loss of performance

(resubmit of issue 344793008)

Benchmark url: http://packages.gkny.fr/tst/index.html

BUG=skia:2681

Committed: https://skia.googlesource.com/skia/+/753a2964afe5661ce9b2a8ca77ca9d0aabd3173c

R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, mtklein@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/364193004
gyp/core.gypi
gyp/tests.gypi
src/core/SkTHashCache.h [new file with mode: 0644]
src/gpu/gl/GrGLCaps.cpp
src/gpu/gl/GrGLCaps.h
src/gpu/gl/GrGpuGL.cpp
tests/THashCache.cpp [new file with mode: 0644]