mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
8ac30aa6e6
--HG-- rename : js/src/xpconnect/idl/nsIXPConnect.idl => js/xpconnect/idl/nsIXPConnect.idl rename : js/src/xpconnect/loader/mozJSComponentLoader.cpp => js/xpconnect/loader/mozJSComponentLoader.cpp rename : js/src/xpconnect/loader/mozJSComponentLoader.h => js/xpconnect/loader/mozJSComponentLoader.h rename : js/src/xpconnect/loader/mozJSSubScriptLoader.cpp => js/xpconnect/loader/mozJSSubScriptLoader.cpp rename : js/src/xpconnect/public/nsAXPCNativeCallContext.h => js/xpconnect/public/nsAXPCNativeCallContext.h rename : js/src/xpconnect/public/xpc_map_end.h => js/xpconnect/public/xpc_map_end.h rename : js/src/xpconnect/shell/xpcshell.cpp => js/xpconnect/shell/xpcshell.cpp rename : js/src/xpconnect/src/Makefile.in => js/xpconnect/src/Makefile.in rename : js/src/xpconnect/src/xpccallcontext.cpp => js/xpconnect/src/XPCCallContext.cpp rename : js/src/xpconnect/src/xpccomponents.cpp => js/xpconnect/src/XPCComponents.cpp rename : js/src/xpconnect/src/xpcconvert.cpp => js/xpconnect/src/XPCConvert.cpp rename : js/src/xpconnect/src/xpcdebug.cpp => js/xpconnect/src/XPCDebug.cpp rename : js/src/xpconnect/src/xpcinlines.h => js/xpconnect/src/XPCInlines.h rename : js/src/xpconnect/src/xpcjsid.cpp => js/xpconnect/src/XPCJSID.cpp rename : js/src/xpconnect/src/xpcjsruntime.cpp => js/xpconnect/src/XPCJSRuntime.cpp rename : js/src/xpconnect/src/xpclog.cpp => js/xpconnect/src/XPCLog.cpp rename : js/src/xpconnect/src/xpclog.h => js/xpconnect/src/XPCLog.h rename : js/src/xpconnect/src/xpcmaps.cpp => js/xpconnect/src/XPCMaps.cpp rename : js/src/xpconnect/src/xpcmaps.h => js/xpconnect/src/XPCMaps.h rename : js/src/xpconnect/src/xpcquickstubs.cpp => js/xpconnect/src/XPCQuickStubs.cpp rename : js/src/xpconnect/src/xpcquickstubs.h => js/xpconnect/src/XPCQuickStubs.h rename : js/src/xpconnect/src/xpcruntimesvc.cpp => js/xpconnect/src/XPCRuntimeService.cpp rename : js/src/xpconnect/src/xpcthreadcontext.cpp => js/xpconnect/src/XPCThreadContext.cpp rename : js/src/xpconnect/src/xpcthrower.cpp => js/xpconnect/src/XPCThrower.cpp rename : js/src/xpconnect/src/xpcvariant.cpp => js/xpconnect/src/XPCVariant.cpp rename : js/src/xpconnect/src/xpcwrappedjs.cpp => js/xpconnect/src/XPCWrappedJS.cpp rename : js/src/xpconnect/src/xpcwrappedjsclass.cpp => js/xpconnect/src/XPCWrappedJSClass.cpp rename : js/src/xpconnect/src/xpcwrappednative.cpp => js/xpconnect/src/XPCWrappedNative.cpp rename : js/src/xpconnect/src/xpcwrappednativeinfo.cpp => js/xpconnect/src/XPCWrappedNativeInfo.cpp rename : js/src/xpconnect/src/xpcwrappednativejsops.cpp => js/xpconnect/src/XPCWrappedNativeJSOps.cpp rename : js/src/xpconnect/src/xpcwrappednativeproto.cpp => js/xpconnect/src/XPCWrappedNativeProto.cpp rename : js/src/xpconnect/src/xpcwrappednativescope.cpp => js/xpconnect/src/XPCWrappedNativeScope.cpp rename : js/src/xpconnect/src/XPCWrapper.cpp => js/xpconnect/src/XPCWrapper.cpp rename : js/src/xpconnect/src/XPCWrapper.h => js/xpconnect/src/XPCWrapper.h rename : js/src/xpconnect/src/dom_quickstubs.qsconf => js/xpconnect/src/dom_quickstubs.qsconf rename : js/src/xpconnect/src/nsXPConnect.cpp => js/xpconnect/src/nsXPConnect.cpp rename : js/src/xpconnect/src/qsgen.py => js/xpconnect/src/qsgen.py rename : js/src/xpconnect/src/xpcprivate.h => js/xpconnect/src/xpcprivate.h rename : js/src/xpconnect/src/xpcpublic.h => js/xpconnect/src/xpcpublic.h rename : js/src/xpconnect/tests/chrome/test_doublewrappedcompartments.xul => js/xpconnect/tests/chrome/test_doublewrappedcompartments.xul rename : js/src/xpconnect/tests/components/native/xpctest_attributes.cpp => js/xpconnect/tests/components/native/xpctest_attributes.cpp rename : js/src/xpconnect/tests/components/native/xpctest_params.cpp => js/xpconnect/tests/components/native/xpctest_params.cpp rename : js/src/xpconnect/tests/components/native/xpctest_private.h => js/xpconnect/tests/components/native/xpctest_private.h rename : js/src/xpconnect/tests/mochitest/file_doublewrappedcompartments.html => js/xpconnect/tests/mochitest/file_doublewrappedcompartments.html rename : js/src/xpconnect/tests/mochitest/test_bug502959.html => js/xpconnect/tests/mochitest/test_bug502959.html rename : js/src/xpconnect/tests/mochitest/test_bug505915.html => js/xpconnect/tests/mochitest/test_bug505915.html rename : js/src/xpconnect/wrappers/AccessCheck.cpp => js/xpconnect/wrappers/AccessCheck.cpp rename : js/src/xpconnect/wrappers/AccessCheck.h => js/xpconnect/wrappers/AccessCheck.h rename : js/src/xpconnect/wrappers/CrossOriginWrapper.cpp => js/xpconnect/wrappers/CrossOriginWrapper.cpp rename : js/src/xpconnect/wrappers/CrossOriginWrapper.h => js/xpconnect/wrappers/CrossOriginWrapper.h rename : js/src/xpconnect/wrappers/FilteringWrapper.cpp => js/xpconnect/wrappers/FilteringWrapper.cpp rename : js/src/xpconnect/wrappers/FilteringWrapper.h => js/xpconnect/wrappers/FilteringWrapper.h rename : js/src/xpconnect/wrappers/WrapperFactory.cpp => js/xpconnect/wrappers/WrapperFactory.cpp rename : js/src/xpconnect/wrappers/WrapperFactory.h => js/xpconnect/wrappers/WrapperFactory.h rename : js/src/xpconnect/wrappers/XrayWrapper.cpp => js/xpconnect/wrappers/XrayWrapper.cpp rename : js/src/xpconnect/wrappers/XrayWrapper.h => js/xpconnect/wrappers/XrayWrapper.h
136 lines
4.1 KiB
C++
136 lines
4.1 KiB
C++
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
*
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
* the License. You may obtain a copy of the License at
|
|
* http://www.mozilla.org/MPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
* for the specific language governing rights and limitations under the
|
|
* License.
|
|
*
|
|
* The Original Code is Mozilla Corporation code.
|
|
*
|
|
* The Initial Developer of the Original Code is Mozilla Foundation.
|
|
* Portions created by the Initial Developer are Copyright (C) 2010
|
|
* the Initial Developer. All Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
* Vladimir Vukicevic <vladimir@pobox.com>
|
|
* Bas Schouten <bschouten@mozilla.com>
|
|
*
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
* the provisions above, a recipient may use your version of this file under
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
*
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
#ifndef GFX_CANVASLAYERD3D9_H
|
|
#define GFX_CANVASLAYERD3D9_H
|
|
|
|
#include "LayerManagerD3D9.h"
|
|
#include "GLContext.h"
|
|
#include "gfxASurface.h"
|
|
|
|
namespace mozilla {
|
|
namespace layers {
|
|
|
|
class ShadowBufferD3D9;
|
|
|
|
class THEBES_API CanvasLayerD3D9 :
|
|
public CanvasLayer,
|
|
public LayerD3D9
|
|
{
|
|
public:
|
|
CanvasLayerD3D9(LayerManagerD3D9 *aManager)
|
|
: CanvasLayer(aManager, NULL)
|
|
, LayerD3D9(aManager)
|
|
, mDataIsPremultiplied(false)
|
|
, mNeedsYFlip(false)
|
|
, mHasAlpha(true)
|
|
{
|
|
mImplData = static_cast<LayerD3D9*>(this);
|
|
aManager->deviceManager()->mLayersWithResources.AppendElement(this);
|
|
}
|
|
|
|
~CanvasLayerD3D9();
|
|
|
|
// CanvasLayer implementation
|
|
virtual void Initialize(const Data& aData);
|
|
|
|
// LayerD3D9 implementation
|
|
virtual Layer* GetLayer();
|
|
virtual void RenderLayer();
|
|
virtual void CleanResources();
|
|
virtual void LayerManagerDestroyed();
|
|
|
|
void CreateTexture();
|
|
|
|
protected:
|
|
typedef mozilla::gl::GLContext GLContext;
|
|
|
|
void UpdateSurface();
|
|
|
|
nsRefPtr<gfxASurface> mSurface;
|
|
nsRefPtr<GLContext> mGLContext;
|
|
nsRefPtr<IDirect3DTexture9> mTexture;
|
|
|
|
PRUint32 mCanvasFramebuffer;
|
|
|
|
bool mDataIsPremultiplied;
|
|
bool mNeedsYFlip;
|
|
bool mHasAlpha;
|
|
};
|
|
|
|
// NB: eventually we'll have separate shadow canvas2d and shadow
|
|
// canvas3d layers, but currently they look the same from the
|
|
// perspective of the compositor process
|
|
class ShadowCanvasLayerD3D9 : public ShadowCanvasLayer,
|
|
public LayerD3D9
|
|
{
|
|
public:
|
|
ShadowCanvasLayerD3D9(LayerManagerD3D9* aManager);
|
|
virtual ~ShadowCanvasLayerD3D9();
|
|
|
|
// CanvasLayer impl
|
|
virtual void Initialize(const Data& aData);
|
|
// This isn't meaningful for shadow canvas.
|
|
virtual void Updated(const nsIntRect&) {}
|
|
|
|
// ShadowCanvasLayer impl
|
|
virtual void Swap(const CanvasSurface& aNewFront,
|
|
bool needYFlip,
|
|
CanvasSurface* aNewBack);
|
|
virtual void DestroyFrontBuffer();
|
|
virtual void Disconnect();
|
|
|
|
virtual void Destroy();
|
|
|
|
// LayerD3D9 implementation
|
|
virtual Layer* GetLayer();
|
|
virtual void RenderLayer();
|
|
virtual void CleanResources();
|
|
virtual void LayerManagerDestroyed();
|
|
|
|
private:
|
|
virtual void Init(bool needYFlip);
|
|
|
|
bool mNeedsYFlip;
|
|
nsRefPtr<ShadowBufferD3D9> mBuffer;
|
|
};
|
|
|
|
} /* layers */
|
|
} /* mozilla */
|
|
#endif /* GFX_CANVASLAYERD3D9_H */
|