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