gfx/angle/src/libGLESv2/renderer/IndexDataManager.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 //
michael@0 2 // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
michael@0 3 // Use of this source code is governed by a BSD-style license that can be
michael@0 4 // found in the LICENSE file.
michael@0 5 //
michael@0 6
michael@0 7 // IndexDataManager.h: Defines the IndexDataManager, a class that
michael@0 8 // runs the Buffer translation process for index buffers.
michael@0 9
michael@0 10 #ifndef LIBGLESV2_INDEXDATAMANAGER_H_
michael@0 11 #define LIBGLESV2_INDEXDATAMANAGER_H_
michael@0 12
michael@0 13 #include "common/angleutils.h"
michael@0 14
michael@0 15 namespace
michael@0 16 {
michael@0 17 enum { INITIAL_INDEX_BUFFER_SIZE = 4096 * sizeof(GLuint) };
michael@0 18 }
michael@0 19
michael@0 20 namespace gl
michael@0 21 {
michael@0 22 class Buffer;
michael@0 23 }
michael@0 24
michael@0 25 namespace rx
michael@0 26 {
michael@0 27 class StaticIndexBufferInterface;
michael@0 28 class StreamingIndexBufferInterface;
michael@0 29 class IndexBuffer;
michael@0 30 class BufferStorage;
michael@0 31 class Renderer;
michael@0 32
michael@0 33 struct TranslatedIndexData
michael@0 34 {
michael@0 35 unsigned int minIndex;
michael@0 36 unsigned int maxIndex;
michael@0 37 unsigned int startIndex;
michael@0 38 unsigned int startOffset; // In bytes
michael@0 39
michael@0 40 IndexBuffer *indexBuffer;
michael@0 41 BufferStorage *storage;
michael@0 42 unsigned int serial;
michael@0 43 };
michael@0 44
michael@0 45 class IndexDataManager
michael@0 46 {
michael@0 47 public:
michael@0 48 explicit IndexDataManager(Renderer *renderer);
michael@0 49 virtual ~IndexDataManager();
michael@0 50
michael@0 51 GLenum prepareIndexData(GLenum type, GLsizei count, gl::Buffer *arrayElementBuffer, const GLvoid *indices, TranslatedIndexData *translated);
michael@0 52 StaticIndexBufferInterface *getCountingIndices(GLsizei count);
michael@0 53
michael@0 54 private:
michael@0 55 DISALLOW_COPY_AND_ASSIGN(IndexDataManager);
michael@0 56
michael@0 57 Renderer *const mRenderer;
michael@0 58
michael@0 59 StreamingIndexBufferInterface *mStreamingBufferShort;
michael@0 60 StreamingIndexBufferInterface *mStreamingBufferInt;
michael@0 61 StaticIndexBufferInterface *mCountingBuffer;
michael@0 62 };
michael@0 63
michael@0 64 }
michael@0 65
michael@0 66 #endif // LIBGLESV2_INDEXDATAMANAGER_H_

mercurial