mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 690cba3bb817
This commit is contained in:
parent
b07592468b
commit
dca1953deb
@ -44,6 +44,7 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
#include "gfxImageSurface.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
@ -137,6 +138,7 @@ private:
|
||||
SkBitmap mBitmap;
|
||||
SkRefPtr<SkCanvas> mCanvas;
|
||||
SkRefPtr<SkDevice> mDevice;
|
||||
nsRefPtr<gfxImageSurface> mImageSurface;
|
||||
vector<SourceSurfaceSkia*> mSnapshots;
|
||||
};
|
||||
|
||||
|
@ -180,7 +180,7 @@ Factory::CreateScaledFontForNativeFont(const NativeFont &aNativeFont, Float aSiz
|
||||
#ifdef WIN32
|
||||
case NATIVE_FONT_GDI_FONT_FACE:
|
||||
{
|
||||
return new ScaledFontWin(static_cast<LOGFONT*>(aNativeFont.mFont), aSize);
|
||||
return new ScaledFontWin(static_cast<gfxGDIFont*>(aNativeFont.mFont), aSize);
|
||||
}
|
||||
#endif
|
||||
case NATIVE_FONT_SKIA_FONT_FACE:
|
||||
|
@ -37,6 +37,8 @@
|
||||
|
||||
#include "ScaledFontBase.h"
|
||||
|
||||
#include "gfxFont.h"
|
||||
|
||||
#ifdef USE_SKIA
|
||||
#include "PathSkia.h"
|
||||
#include "skia/SkPaint.h"
|
||||
|
@ -45,10 +45,11 @@
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
|
||||
ScaledFontWin::ScaledFontWin(LOGFONT* aFont, Float aSize)
|
||||
ScaledFontWin::ScaledFontWin(gfxGDIFont* aFont, Float aSize)
|
||||
: ScaledFontBase(aSize)
|
||||
, mLogFont(*aFont)
|
||||
{
|
||||
LOGFONT lf;
|
||||
GetObject(aFont->GetHFONT(), sizeof(LOGFONT), &lf);
|
||||
}
|
||||
|
||||
#ifdef USE_SKIA
|
||||
|
@ -39,7 +39,7 @@
|
||||
#define MOZILLA_GFX_SCALEDFONTWIN_H_
|
||||
|
||||
#include "ScaledFontBase.h"
|
||||
#include <windows.h>
|
||||
#include "gfxGDIFont.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
@ -47,7 +47,7 @@ namespace gfx {
|
||||
class ScaledFontWin : public ScaledFontBase
|
||||
{
|
||||
public:
|
||||
ScaledFontWin(LOGFONT* aFont, Float aSize);
|
||||
ScaledFontWin(gfxGDIFont* aFont, Float aSize);
|
||||
|
||||
virtual FontType GetType() const { return FONT_GDI; }
|
||||
#ifdef USE_SKIA
|
||||
@ -57,7 +57,6 @@ private:
|
||||
#ifdef USE_SKIA
|
||||
friend class DrawTargetSkia;
|
||||
#endif
|
||||
LOGFONT mLogFont;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -731,9 +731,7 @@ gfxWindowsPlatform::GetScaledFontForFont(gfxFont *aFont)
|
||||
|
||||
NativeFont nativeFont;
|
||||
nativeFont.mType = NATIVE_FONT_GDI_FONT_FACE;
|
||||
LOGFONT lf;
|
||||
GetObject(static_cast<gfxGDIFont*>(aFont)->GetHFONT(), sizeof(LOGFONT), &lf);
|
||||
nativeFont.mFont = &lf;
|
||||
nativeFont.mFont = aFont;
|
||||
RefPtr<ScaledFont> scaledFont =
|
||||
Factory::CreateScaledFontForNativeFont(nativeFont, aFont->GetAdjustedSize());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user