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