mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 932096 - Add a GetDrawTarget method to nsRenderingContext to aid in Moz2D conversion. r=Bas
This commit is contained in:
parent
2d9d4c1ac1
commit
a5a975b719
@ -10,6 +10,7 @@
|
||||
#include <sys/types.h> // for int32_t
|
||||
#include "gfxContext.h" // for gfxContext
|
||||
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/UserData.h" // for UserData, UserDataKey
|
||||
#include "nsAutoPtr.h" // for nsRefPtr
|
||||
#include "nsBoundingMetrics.h" // for nsBoundingMetrics
|
||||
@ -37,6 +38,7 @@ class nsRenderingContext
|
||||
{
|
||||
typedef mozilla::gfx::UserData UserData;
|
||||
typedef mozilla::gfx::UserDataKey UserDataKey;
|
||||
typedef mozilla::gfx::DrawTarget DrawTarget;
|
||||
|
||||
public:
|
||||
nsRenderingContext() : mP2A(0.) {}
|
||||
@ -49,6 +51,7 @@ public:
|
||||
|
||||
// These accessors will never return null.
|
||||
gfxContext *ThebesContext() { return mThebes; }
|
||||
DrawTarget *GetDrawTarget() { return mThebes->GetDrawTarget(); }
|
||||
nsDeviceContext *DeviceContext() { return mDeviceContext; }
|
||||
int32_t AppUnitsPerDevPixel() { return NSToIntRound(mP2A); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user