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 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GFX_THEBESLAYERD3D10_H
7 #define GFX_THEBESLAYERD3D10_H
9 #include "LayerManagerD3D10.h"
11 namespace mozilla {
12 namespace layers {
14 class ThebesLayerD3D10 : public ThebesLayer,
15 public LayerD3D10
16 {
17 public:
18 ThebesLayerD3D10(LayerManagerD3D10 *aManager);
19 virtual ~ThebesLayerD3D10();
21 void Validate(ReadbackProcessor *aReadback);
23 /* ThebesLayer implementation */
24 void InvalidateRegion(const nsIntRegion& aRegion);
26 /* LayerD3D10 implementation */
27 virtual Layer* GetLayer();
28 virtual void RenderLayer();
29 virtual void Validate() { Validate(nullptr); }
30 virtual void LayerManagerDestroyed();
32 private:
33 /* Texture with our surface data */
34 nsRefPtr<ID3D10Texture2D> mTexture;
36 /* Shader resource view for our texture */
37 nsRefPtr<ID3D10ShaderResourceView> mSRView;
39 /* Texture for render-on-whitew when doing component alpha */
40 nsRefPtr<ID3D10Texture2D> mTextureOnWhite;
42 /* Shader resource view for our render-on-white texture */
43 nsRefPtr<ID3D10ShaderResourceView> mSRViewOnWhite;
45 /* Area of layer currently stored in texture(s) */
46 nsIntRect mTextureRect;
48 /* Last surface mode set in Validate() */
49 SurfaceMode mCurrentSurfaceMode;
51 /* Checks if our D2D surface has the right content type */
52 void VerifyContentType(SurfaceMode aMode);
54 /* This contains the thebes surface */
55 nsRefPtr<gfxASurface> mD2DSurface;
57 mozilla::RefPtr<mozilla::gfx::DrawTarget> mDrawTarget;
59 /* This contains the thebes surface for our render-on-white texture */
60 nsRefPtr<gfxASurface> mD2DSurfaceOnWhite;
62 /* Have a region of our layer drawn */
63 void DrawRegion(nsIntRegion &aRegion, SurfaceMode aMode);
65 /* Create a new texture */
66 void CreateNewTextures(const gfx::IntSize &aSize, SurfaceMode aMode);
68 // Fill textures with opaque black and white in the specified region.
69 void FillTexturesBlackWhite(const nsIntRegion& aRegion, const nsIntPoint& aOffset);
71 /* Copy a texture region */
72 void CopyRegion(ID3D10Texture2D* aSrc, const nsIntPoint &aSrcOffset,
73 ID3D10Texture2D* aDest, const nsIntPoint &aDestOffset,
74 const nsIntRegion &aCopyRegion, nsIntRegion* aValidRegion);
75 };
77 } /* layers */
78 } /* mozilla */
79 #endif /* GFX_THEBESLAYERD3D10_H */