author | Benoit Jacob <bjacob@mozilla.com> |
Fri, 09 Nov 2012 16:42:21 -0500 | |
changeset 112879 | d7d0cb3b68e01bf60f5a4b635d3e775f4900b265 |
parent 112878 | 1a69f5c63aab3cd5b2c04bf29d2d84bbbb2251c7 |
child 112880 | a31d3b784446ca8eaf92c2f22dbed388297a47e1 |
push id | 23839 |
push user | ryanvm@gmail.com |
push date | Sat, 10 Nov 2012 01:34:49 +0000 |
treeherder | autoland@a47525b93528 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jgilbert |
bugs | 800612 |
milestone | 19.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/content/canvas/src/WebGLElementArrayCache.cpp +++ b/content/canvas/src/WebGLElementArrayCache.cpp @@ -328,16 +328,19 @@ struct TreeForType<uint16_t> }; // When the buffer gets updated from firstByte to lastByte, // calling this method will notify the tree accordingly template<typename T> void WebGLElementArrayCacheTree<T>::Invalidate(size_t firstByte, size_t lastByte) { lastByte = NS_MIN(lastByte, mNumLeaves * sElementsPerLeaf * sizeof(T) - 1); + if (firstByte > lastByte) { + return; + } size_t firstLeaf = LeafForByte(firstByte); size_t lastLeaf = LeafForByte(lastByte); if (mInvalidated) { mFirstInvalidatedLeaf = NS_MIN(firstLeaf, mFirstInvalidatedLeaf); mLastInvalidatedLeaf = NS_MAX(lastLeaf, mLastInvalidatedLeaf); } else {