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.

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

mercurial