mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 950677 - Change gfxIntSize to gfx::IntSize in DirectX files. r=nical
This commit is contained in:
parent
7b9c2a5b21
commit
48371ada8e
@ -24,7 +24,7 @@ static already_AddRefed<ID3D10Texture2D>
|
||||
DataToTexture(ID3D10Device *aDevice,
|
||||
unsigned char *data,
|
||||
int stride,
|
||||
const gfxIntSize &aSize)
|
||||
const IntSize &aSize)
|
||||
{
|
||||
D3D10_SUBRESOURCE_DATA srdata;
|
||||
|
||||
@ -51,7 +51,7 @@ DataToTexture(ID3D10Device *aDevice,
|
||||
static already_AddRefed<ID3D10Texture2D>
|
||||
SurfaceToTexture(ID3D10Device *aDevice,
|
||||
gfxASurface *aSurface,
|
||||
const gfxIntSize &aSize)
|
||||
const IntSize &aSize)
|
||||
{
|
||||
if (!aSurface) {
|
||||
return nullptr;
|
||||
@ -72,7 +72,7 @@ SurfaceToTexture(ID3D10Device *aDevice,
|
||||
nsRefPtr<gfxImageSurface> imageSurface = aSurface->GetAsImageSurface();
|
||||
|
||||
if (!imageSurface) {
|
||||
imageSurface = new gfxImageSurface(aSize,
|
||||
imageSurface = new gfxImageSurface(ThebesIntSize(aSize),
|
||||
gfxImageFormatARGB32);
|
||||
|
||||
nsRefPtr<gfxContext> context = new gfxContext(imageSurface);
|
||||
@ -397,7 +397,7 @@ void ImageLayerD3D10::AllocateTexturesYCbCr(PlanarYCbCrImage *aImage)
|
||||
}
|
||||
|
||||
already_AddRefed<ID3D10ShaderResourceView>
|
||||
ImageLayerD3D10::GetAsTexture(gfxIntSize* aSize)
|
||||
ImageLayerD3D10::GetAsTexture(gfx::IntSize* aSize)
|
||||
{
|
||||
if (!GetContainer()) {
|
||||
return nullptr;
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
|
||||
void AllocateTexturesYCbCr(PlanarYCbCrImage *aImage);
|
||||
|
||||
virtual already_AddRefed<ID3D10ShaderResourceView> GetAsTexture(gfxIntSize* aSize);
|
||||
virtual already_AddRefed<ID3D10ShaderResourceView> GetAsTexture(gfx::IntSize* aSize);
|
||||
|
||||
private:
|
||||
ID3D10ShaderResourceView* GetImageSRView(Image* aImage, bool& aHasAlpha, IDXGIKeyedMutex **aMutex = nullptr);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "LayerManagerD3D10.h"
|
||||
#include "LayerManagerD3D10Effect.h"
|
||||
#include "gfxWindowsPlatform.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxD2DSurface.h"
|
||||
#include "gfxFailure.h"
|
||||
#include "cairo-win32.h"
|
||||
@ -850,7 +851,7 @@ uint8_t
|
||||
LayerD3D10::LoadMaskTexture()
|
||||
{
|
||||
if (Layer* maskLayer = GetLayer()->GetMaskLayer()) {
|
||||
gfxIntSize size;
|
||||
IntSize size;
|
||||
nsRefPtr<ID3D10ShaderResourceView> maskSRV =
|
||||
static_cast<LayerD3D10*>(maskLayer->ImplData())->GetAsTexture(&size);
|
||||
|
||||
@ -861,7 +862,7 @@ LayerD3D10::LoadMaskTexture()
|
||||
gfxMatrix maskTransform;
|
||||
bool maskIs2D = maskLayer->GetEffectiveTransform().CanDraw2D(&maskTransform);
|
||||
NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!");
|
||||
gfxRect bounds = gfxRect(gfxPoint(), size);
|
||||
gfxRect bounds = gfxRect(gfxPoint(), ThebesIntSize(size));
|
||||
bounds = maskTransform.TransformBounds(bounds);
|
||||
|
||||
effect()->GetVariableByName("vMaskQuad")->AsVector()->SetFloatVector(
|
||||
|
@ -230,7 +230,7 @@ public:
|
||||
* Any layer that can be used as a mask layer should override this method.
|
||||
* If aSize is non-null, it will contain the size of the texture.
|
||||
*/
|
||||
virtual already_AddRefed<ID3D10ShaderResourceView> GetAsTexture(gfxIntSize* aSize)
|
||||
virtual already_AddRefed<ID3D10ShaderResourceView> GetAsTexture(gfx::IntSize* aSize)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -12,12 +12,13 @@
|
||||
#include "Nv3DVUtils.h"
|
||||
#include "plstr.h"
|
||||
#include <algorithm>
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "gfxWindowsPlatform.h"
|
||||
#include "TextureD3D9.h"
|
||||
#include "mozilla/gfx/Point.h"
|
||||
|
||||
using mozilla::gfx::IntSize;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@ -548,7 +549,7 @@ bool
|
||||
LoadMaskTexture(Layer* aMask, IDirect3DDevice9* aDevice,
|
||||
uint32_t aMaskTexRegister)
|
||||
{
|
||||
gfxIntSize size;
|
||||
gfx::IntSize size;
|
||||
nsRefPtr<IDirect3DTexture9> texture =
|
||||
static_cast<LayerD3D9*>(aMask->ImplData())->GetAsTexture(&size);
|
||||
|
||||
@ -559,7 +560,7 @@ LoadMaskTexture(Layer* aMask, IDirect3DDevice9* aDevice,
|
||||
gfxMatrix maskTransform;
|
||||
bool maskIs2D = aMask->GetEffectiveTransform().CanDraw2D(&maskTransform);
|
||||
NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!");
|
||||
gfxRect bounds = gfxRect(gfxPoint(), size);
|
||||
gfxRect bounds = gfxRect(gfxPoint(), gfx::ThebesIntSize(size));
|
||||
bounds = maskTransform.TransformBounds(bounds);
|
||||
|
||||
aDevice->SetVertexShaderConstantF(DeviceManagerD3D9::sMaskQuadRegister,
|
||||
|
@ -4,6 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ipc/AutoOpenSurface.h"
|
||||
#include "mozilla/gfx/Point.h"
|
||||
#include "mozilla/layers/PLayerTransaction.h"
|
||||
#include "gfxSharedImageSurface.h"
|
||||
|
||||
@ -21,6 +22,8 @@
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
static inline _D3DFORMAT
|
||||
D3dFormatForGfxFormat(gfxImageFormat aFormat)
|
||||
{
|
||||
@ -35,7 +38,7 @@ static already_AddRefed<IDirect3DTexture9>
|
||||
DataToTexture(IDirect3DDevice9 *aDevice,
|
||||
unsigned char *aData,
|
||||
int aStride,
|
||||
const gfxIntSize &aSize,
|
||||
const IntSize &aSize,
|
||||
_D3DFORMAT aFormat)
|
||||
{
|
||||
nsRefPtr<IDirect3DTexture9> texture;
|
||||
@ -131,13 +134,13 @@ OpenSharedTexture(const D3DSURFACE_DESC& aDesc,
|
||||
static already_AddRefed<IDirect3DTexture9>
|
||||
SurfaceToTexture(IDirect3DDevice9 *aDevice,
|
||||
gfxASurface *aSurface,
|
||||
const gfxIntSize &aSize)
|
||||
const IntSize &aSize)
|
||||
{
|
||||
|
||||
nsRefPtr<gfxImageSurface> imageSurface = aSurface->GetAsImageSurface();
|
||||
|
||||
if (!imageSurface) {
|
||||
imageSurface = new gfxImageSurface(aSize,
|
||||
imageSurface = new gfxImageSurface(ThebesIntSize(aSize),
|
||||
gfxImageFormatARGB32);
|
||||
|
||||
nsRefPtr<gfxContext> context = new gfxContext(imageSurface);
|
||||
@ -545,7 +548,7 @@ ImageLayerD3D9::RenderLayer()
|
||||
}
|
||||
|
||||
already_AddRefed<IDirect3DTexture9>
|
||||
ImageLayerD3D9::GetAsTexture(gfxIntSize* aSize)
|
||||
ImageLayerD3D9::GetAsTexture(gfx::IntSize* aSize)
|
||||
{
|
||||
if (!GetContainer()) {
|
||||
return nullptr;
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
|
||||
virtual void RenderLayer();
|
||||
|
||||
virtual already_AddRefed<IDirect3DTexture9> GetAsTexture(gfxIntSize* aSize);
|
||||
virtual already_AddRefed<IDirect3DTexture9> GetAsTexture(gfx::IntSize* aSize);
|
||||
|
||||
private:
|
||||
IDirect3DTexture9* GetTexture(Image *aImage, bool& aHasAlpha);
|
||||
|
@ -248,7 +248,7 @@ public:
|
||||
* If aSize is non-null and a texture is successfully returned, aSize will
|
||||
* contain the size of the texture.
|
||||
*/
|
||||
virtual already_AddRefed<IDirect3DTexture9> GetAsTexture(gfxIntSize* aSize)
|
||||
virtual already_AddRefed<IDirect3DTexture9> GetAsTexture(gfx::IntSize* aSize)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user