gfx/angle/src/libGLESv2/renderer/Image11.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) 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 // Image11.h: Defines the rx::Image11 class, which acts as the interface to
michael@0 8 // the actual underlying resources of a Texture
michael@0 9
michael@0 10 #ifndef LIBGLESV2_RENDERER_IMAGE11_H_
michael@0 11 #define LIBGLESV2_RENDERER_IMAGE11_H_
michael@0 12
michael@0 13 #include "libGLESv2/renderer/Image.h"
michael@0 14
michael@0 15 #include "common/debug.h"
michael@0 16
michael@0 17 namespace gl
michael@0 18 {
michael@0 19 class Framebuffer;
michael@0 20 }
michael@0 21
michael@0 22 namespace rx
michael@0 23 {
michael@0 24 class Renderer;
michael@0 25 class Renderer11;
michael@0 26 class TextureStorageInterface2D;
michael@0 27 class TextureStorageInterfaceCube;
michael@0 28
michael@0 29 class Image11 : public Image
michael@0 30 {
michael@0 31 public:
michael@0 32 Image11();
michael@0 33 virtual ~Image11();
michael@0 34
michael@0 35 static Image11 *makeImage11(Image *img);
michael@0 36
michael@0 37 static void generateMipmap(Image11 *dest, Image11 *src);
michael@0 38
michael@0 39 virtual bool isDirty() const;
michael@0 40
michael@0 41 virtual bool updateSurface(TextureStorageInterface2D *storage, int level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height);
michael@0 42 virtual bool updateSurface(TextureStorageInterfaceCube *storage, int face, int level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height);
michael@0 43
michael@0 44 virtual bool redefine(Renderer *renderer, GLint internalformat, GLsizei width, GLsizei height, bool forceRelease);
michael@0 45
michael@0 46 virtual bool isRenderableFormat() const;
michael@0 47 DXGI_FORMAT getDXGIFormat() const;
michael@0 48
michael@0 49 virtual void loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
michael@0 50 GLint unpackAlignment, const void *input);
michael@0 51 virtual void loadCompressedData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
michael@0 52 const void *input);
michael@0 53
michael@0 54 virtual void copy(GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height, gl::Framebuffer *source);
michael@0 55
michael@0 56 protected:
michael@0 57 HRESULT map(D3D11_MAPPED_SUBRESOURCE *map);
michael@0 58 void unmap();
michael@0 59
michael@0 60 private:
michael@0 61 DISALLOW_COPY_AND_ASSIGN(Image11);
michael@0 62
michael@0 63 ID3D11Texture2D *getStagingTexture();
michael@0 64 unsigned int getStagingSubresource();
michael@0 65 void createStagingTexture();
michael@0 66
michael@0 67 Renderer11 *mRenderer;
michael@0 68
michael@0 69 DXGI_FORMAT mDXGIFormat;
michael@0 70 ID3D11Texture2D *mStagingTexture;
michael@0 71 unsigned int mStagingSubresource;
michael@0 72 };
michael@0 73
michael@0 74 }
michael@0 75
michael@0 76 #endif // LIBGLESV2_RENDERER_IMAGE11_H_

mercurial