Edit

kc3-lang/angle/src/libANGLE/renderer/IndexRangeCache.h

Branch :

  • Show log

    Commit

  • Author : Olli Etuaho
    Date : 2015-03-25 17:05:59
    Hash : 3d5f2687
    Message : Remove unused streamOffset from IndexRangeCache This value is now redundant - it is always the same as regular offset. TEST=angle_end2end_tests BUG=angleproject:956 Change-Id: If4b6c8bcbebf24fbf84723fe081fd058916cc504 Reviewed-on: https://chromium-review.googlesource.com/262423 Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>

  • src/libANGLE/renderer/IndexRangeCache.h
  • //
    // Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    // IndexRangeCache.h: Defines the rx::IndexRangeCache class which stores information about
    // ranges of indices.
    
    #ifndef LIBANGLE_RENDERER_INDEXRANGECACHE_H_
    #define LIBANGLE_RENDERER_INDEXRANGECACHE_H_
    
    #include "common/angleutils.h"
    #include "common/mathutil.h"
    
    #include "angle_gl.h"
    
    #include <map>
    
    namespace rx
    {
    
    class IndexRangeCache
    {
      public:
        void addRange(GLenum type, unsigned int offset, GLsizei count, const RangeUI &range);
        bool findRange(GLenum type, unsigned int offset, GLsizei count, RangeUI *rangeOut) const;
    
        void invalidateRange(unsigned int offset, unsigned int size);
        void clear();
    
        static RangeUI ComputeRange(GLenum type, const GLvoid *indices, GLsizei count);
    
      private:
        struct IndexRange
        {
            GLenum type;
            unsigned int offset;
            GLsizei count;
    
            IndexRange();
            IndexRange(GLenum type, intptr_t offset, GLsizei count);
    
            bool operator<(const IndexRange& rhs) const;
        };
    
        typedef std::map<IndexRange, RangeUI> IndexRangeMap;
        IndexRangeMap mIndexRangeCache;
    };
    
    }
    
    #endif // LIBANGLE_RENDERER_INDEXRANGECACHE_H_