mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 933019, part 5 - Remove code for handling Thebes backed gfxContext from various files under gfx/thebes/. r=Bas
This commit is contained in:
parent
6f6349e6b7
commit
2b254aad87
@ -27,13 +27,6 @@ gfxQuartzNativeDrawing::BeginNativeDrawing()
|
||||
{
|
||||
NS_ASSERTION(!mCGContext, "BeginNativeDrawing called when drawing already in progress");
|
||||
|
||||
if (mContext->IsCairo()) {
|
||||
// We're past that now. Any callers that still supply a Cairo context
|
||||
// don't deserve native theming.
|
||||
NS_WARNING("gfxQuartzNativeDrawing being used with a gfxContext that is not backed by a DrawTarget");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DrawTarget *dt = mContext->GetDrawTarget();
|
||||
if (dt->GetBackendType() != BackendType::COREGRAPHICS || dt->IsDualDrawTarget()) {
|
||||
IntSize backingSize(NSToIntFloor(mNativeRect.width * mBackingScale),
|
||||
@ -62,7 +55,6 @@ void
|
||||
gfxQuartzNativeDrawing::EndNativeDrawing()
|
||||
{
|
||||
NS_ASSERTION(mCGContext, "EndNativeDrawing called without BeginNativeDrawing");
|
||||
MOZ_ASSERT(!mContext->IsCairo(), "BeginNativeDrawing succeeded with cairo context?");
|
||||
|
||||
mBorrowedContext.Finish();
|
||||
if (mDrawTarget) {
|
||||
|
@ -183,9 +183,8 @@ gfxWindowsNativeDrawing::BeginNativeDrawing()
|
||||
bool
|
||||
gfxWindowsNativeDrawing::IsDoublePass()
|
||||
{
|
||||
if (!mContext->IsCairo() &&
|
||||
(mContext->GetDrawTarget()->GetBackendType() != mozilla::gfx::BackendType::CAIRO ||
|
||||
mContext->GetDrawTarget()->IsDualDrawTarget())) {
|
||||
if (mContext->GetDrawTarget()->GetBackendType() != mozilla::gfx::BackendType::CAIRO ||
|
||||
mContext->GetDrawTarget()->IsDualDrawTarget()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,6 @@ struct DCFromContext {
|
||||
DCFromContext(gfxContext *aContext) {
|
||||
dc = nullptr;
|
||||
nsRefPtr<gfxASurface> aSurface = aContext->CurrentSurface();
|
||||
NS_ASSERTION(aSurface || !aContext->IsCairo(), "DCFromContext: null surface");
|
||||
if (aSurface &&
|
||||
(aSurface->GetType() == gfxSurfaceType::Win32 ||
|
||||
aSurface->GetType() == gfxSurfaceType::Win32Printing))
|
||||
|
@ -140,10 +140,6 @@ gfxXlibNativeRenderer::DrawDirect(gfxContext *ctx, nsIntSize size,
|
||||
uint32_t flags,
|
||||
Screen *screen, Visual *visual)
|
||||
{
|
||||
if (ctx->IsCairo()) {
|
||||
return DrawCairo(ctx->GetCairo(), size, flags, screen, visual);
|
||||
}
|
||||
|
||||
// We need to actually borrow the context because we want to read out the
|
||||
// clip rectangles.
|
||||
BorrowedCairoContext borrowed(ctx->GetDrawTarget());
|
||||
@ -529,19 +525,11 @@ gfxXlibNativeRenderer::Draw(gfxContext* ctx, nsIntSize size,
|
||||
gfxPoint offset(drawingRect.x, drawingRect.y);
|
||||
|
||||
DrawingMethod method;
|
||||
cairo_surface_t* cairoTarget = nullptr;
|
||||
DrawTarget* drawTarget = nullptr;
|
||||
gfxPoint deviceTranslation;
|
||||
if (ctx->IsCairo()) {
|
||||
cairoTarget = cairo_get_group_target(ctx->GetCairo());
|
||||
deviceTranslation = ctx->CurrentMatrix().GetTranslation();
|
||||
} else {
|
||||
drawTarget = ctx->GetDrawTarget();
|
||||
Matrix dtTransform = drawTarget->GetTransform();
|
||||
deviceTranslation = gfxPoint(dtTransform._31, dtTransform._32);
|
||||
cairoTarget = static_cast<cairo_surface_t*>
|
||||
DrawTarget* drawTarget = ctx->GetDrawTarget();
|
||||
Matrix dtTransform = drawTarget->GetTransform();
|
||||
gfxPoint deviceTranslation = gfxPoint(dtTransform._31, dtTransform._32);
|
||||
cairo_surface_t* cairoTarget = static_cast<cairo_surface_t*>
|
||||
(drawTarget->GetNativeSurface(NativeSurfaceType::CAIRO_SURFACE));
|
||||
}
|
||||
|
||||
cairo_surface_t* tempXlibSurface =
|
||||
CreateTempXlibSurface(cairoTarget, drawTarget, size,
|
||||
|
Loading…
Reference in New Issue
Block a user