gfx/angle/src/libGLESv2/renderer/Image9.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 // Image9.h: Defines the rx::Image9 class, which acts as the interface to
michael@0 8 // the actual underlying surfaces of a Texture.
michael@0 9
michael@0 10 #ifndef LIBGLESV2_RENDERER_IMAGE9_H_
michael@0 11 #define LIBGLESV2_RENDERER_IMAGE9_H_
michael@0 12
michael@0 13 #include "libGLESv2/renderer/Image.h"
michael@0 14 #include "common/debug.h"
michael@0 15
michael@0 16 namespace gl
michael@0 17 {
michael@0 18 class Framebuffer;
michael@0 19 }
michael@0 20
michael@0 21 namespace rx
michael@0 22 {
michael@0 23 class Renderer;
michael@0 24 class Renderer9;
michael@0 25 class TextureStorageInterface2D;
michael@0 26 class TextureStorageInterfaceCube;
michael@0 27
michael@0 28 class Image9 : public Image
michael@0 29 {
michael@0 30 public:
michael@0 31 Image9();
michael@0 32 ~Image9();
michael@0 33
michael@0 34 static Image9 *makeImage9(Image *img);
michael@0 35
michael@0 36 static void generateMipmap(Image9 *dest, Image9 *source);
michael@0 37 static void generateMip(IDirect3DSurface9 *destSurface, IDirect3DSurface9 *sourceSurface);
michael@0 38 static void copyLockableSurfaces(IDirect3DSurface9 *dest, IDirect3DSurface9 *source);
michael@0 39
michael@0 40 virtual bool redefine(Renderer *renderer, GLint internalformat, GLsizei width, GLsizei height, bool forceRelease);
michael@0 41
michael@0 42 virtual bool isRenderableFormat() const;
michael@0 43 D3DFORMAT getD3DFormat() const;
michael@0 44
michael@0 45 virtual bool isDirty() const {return mSurface && mDirty;}
michael@0 46 IDirect3DSurface9 *getSurface();
michael@0 47
michael@0 48 virtual void setManagedSurface(TextureStorageInterface2D *storage, int level);
michael@0 49 virtual void setManagedSurface(TextureStorageInterfaceCube *storage, int face, int level);
michael@0 50 virtual bool updateSurface(TextureStorageInterface2D *storage, int level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height);
michael@0 51 virtual bool updateSurface(TextureStorageInterfaceCube *storage, int face, int level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height);
michael@0 52
michael@0 53 virtual void loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
michael@0 54 GLint unpackAlignment, const void *input);
michael@0 55 virtual void loadCompressedData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
michael@0 56 const void *input);
michael@0 57
michael@0 58 virtual void copy(GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height, gl::Framebuffer *source);
michael@0 59
michael@0 60 private:
michael@0 61 DISALLOW_COPY_AND_ASSIGN(Image9);
michael@0 62
michael@0 63 void createSurface();
michael@0 64 void setManagedSurface(IDirect3DSurface9 *surface);
michael@0 65 bool updateSurface(IDirect3DSurface9 *dest, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height);
michael@0 66
michael@0 67 HRESULT lock(D3DLOCKED_RECT *lockedRect, const RECT *rect);
michael@0 68 void unlock();
michael@0 69
michael@0 70 Renderer9 *mRenderer;
michael@0 71
michael@0 72 D3DPOOL mD3DPool; // can only be D3DPOOL_SYSTEMMEM or D3DPOOL_MANAGED since it needs to be lockable.
michael@0 73 D3DFORMAT mD3DFormat;
michael@0 74
michael@0 75 IDirect3DSurface9 *mSurface;
michael@0 76 };
michael@0 77 }
michael@0 78
michael@0 79 #endif // LIBGLESV2_RENDERER_IMAGE9_H_

mercurial