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: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=8 et :
3 */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef mozilla_layers_Composer2D_h
9 #define mozilla_layers_Composer2D_h
11 #include "gfxTypes.h"
12 #include "nsISupportsImpl.h"
14 /**
15 * Many platforms have dedicated hardware for simple composition.
16 * This hardware is usually faster or more power efficient than the
17 * GPU. However, in exchange for this better performance, generality
18 * has to be sacrificed: no 3d transforms, no intermediate surfaces,
19 * no special shader effects, loss of other goodies depending on the
20 * platform.
21 *
22 * Composer2D is a very simple interface to this class of hardware
23 * that allows an implementation to "try rendering" with the fast
24 * path. If the given layer tree requires more generality than the
25 * hardware provides, the implementation should bail and have the
26 * layer manager fall back on full GPU composition.
27 */
29 namespace mozilla {
31 namespace gfx {
32 struct Matrix;
33 }
35 namespace layers {
37 class Layer;
39 class Composer2D {
40 NS_INLINE_DECL_REFCOUNTING(Composer2D)
42 protected:
43 // Protected destructor, to discourage deletion outside of Release():
44 virtual ~Composer2D() {}
46 public:
47 /**
48 * Return true if |aRoot| met the implementation's criteria for fast
49 * composition and the render was successful. Return false to fall
50 * back on the GPU.
51 *
52 * |aWorldTransform| must be applied to |aRoot|'s subtree when
53 * rendering to the framebuffer. This is a global transform on the
54 * entire scene, defined in GL space. If the Composer2D
55 * implementation is unable to honor the transform, it should return
56 * false.
57 *
58 * Currently, when TryRender() returns true, the entire framebuffer
59 * must have been rendered.
60 */
61 virtual bool TryRender(Layer* aRoot, const gfx::Matrix& aWorldTransform,
62 bool aGeometryChanged) = 0;
63 };
65 } // namespace layers
66 } // namespace mozilla
68 #endif // mozilla_layers_Composer2D_h