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 // VertexDataManager.h: Defines the VertexDataManager, a class that
8 // runs the Buffer translation process.
10 #ifndef LIBGLESV2_RENDERER_VERTEXDATAMANAGER_H_
11 #define LIBGLESV2_RENDERER_VERTEXDATAMANAGER_H_
13 #include "libGLESv2/Constants.h"
14 #include "common/angleutils.h"
16 namespace gl
17 {
18 class VertexAttribute;
19 class ProgramBinary;
20 }
22 namespace rx
23 {
24 class BufferStorage;
25 class StreamingVertexBufferInterface;
26 class VertexBuffer;
27 class Renderer;
29 struct TranslatedAttribute
30 {
31 bool active;
33 const gl::VertexAttribute *attribute;
34 unsigned int offset;
35 unsigned int stride; // 0 means not to advance the read pointer at all
37 VertexBuffer *vertexBuffer;
38 BufferStorage *storage;
39 unsigned int serial;
40 unsigned int divisor;
41 };
43 class VertexDataManager
44 {
45 public:
46 VertexDataManager(rx::Renderer *renderer);
47 virtual ~VertexDataManager();
49 GLenum prepareVertexData(const gl::VertexAttribute attribs[], gl::ProgramBinary *programBinary, GLint start, GLsizei count, TranslatedAttribute *outAttribs, GLsizei instances);
51 private:
52 DISALLOW_COPY_AND_ASSIGN(VertexDataManager);
54 rx::Renderer *const mRenderer;
56 StreamingVertexBufferInterface *mStreamingBuffer;
58 float mCurrentValue[gl::MAX_VERTEX_ATTRIBS][4];
59 StreamingVertexBufferInterface *mCurrentValueBuffer[gl::MAX_VERTEX_ATTRIBS];
60 std::size_t mCurrentValueOffsets[gl::MAX_VERTEX_ATTRIBS];
61 };
63 }
65 #endif // LIBGLESV2_RENDERER_VERTEXDATAMANAGER_H_