Backed out changeset 690cba3bb817 (bug 719776) because of build failures

This commit is contained in:
Ehsan Akhgari 2012-04-03 17:49:59 -04:00
parent 124634b2dc
commit 55f5039ade
6 changed files with 11 additions and 9 deletions

View File

@ -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;
};

View File

@ -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:

View File

@ -37,6 +37,8 @@
#include "ScaledFontBase.h"
#include "gfxFont.h"
#ifdef USE_SKIA
#include "PathSkia.h"
#include "skia/SkPaint.h"

View File

@ -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

View File

@ -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;
};
}

View File

@ -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());