mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1082598 - Part 5: Fix NPAPI for Skia update. r=jrmuizel
This commit is contained in:
parent
7ba4aae815
commit
397e2e1d65
@ -153,13 +153,18 @@ static void anp_drawBitmapRect(ANPCanvas* canvas, const ANPBitmap* bitmap,
|
|||||||
const ANPPaint* paint) {
|
const ANPPaint* paint) {
|
||||||
SkBitmap bm;
|
SkBitmap bm;
|
||||||
SkRect dstR;
|
SkRect dstR;
|
||||||
SkIRect srcR, *srcPtr = NULL;
|
SkIRect srcR;
|
||||||
|
|
||||||
if (src) {
|
if (src) {
|
||||||
srcPtr = SkANP::SetRect(&srcR, *src);
|
canvas->skcanvas->drawBitmapRect(*SkANP::SetBitmap(&bm, *bitmap),
|
||||||
|
*SkANP::SetRect(&srcR, *src),
|
||||||
|
*SkANP::SetRect(&dstR, *dst),
|
||||||
|
paint);
|
||||||
|
} else {
|
||||||
|
canvas->skcanvas->drawBitmapRect(*SkANP::SetBitmap(&bm, *bitmap),
|
||||||
|
*SkANP::SetRect(&dstR, *dst),
|
||||||
|
paint);
|
||||||
}
|
}
|
||||||
canvas->skcanvas->drawBitmapRect(*SkANP::SetBitmap(&bm, *bitmap), srcPtr,
|
|
||||||
*SkANP::SetRect(&dstR, *dst), paint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "SkANP.h"
|
#include "SkANP.h"
|
||||||
#include "SkFontHost.h"
|
#include "SkFontHost.h"
|
||||||
#include "SkStream.h"
|
#include "SkStream.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
static ANPTypeface* anp_createFromName(const char name[], ANPTypefaceStyle s) {
|
static ANPTypeface* anp_createFromName(const char name[], ANPTypefaceStyle s) {
|
||||||
SkTypeface* tf = SkTypeface::CreateFromName(name,
|
SkTypeface* tf = SkTypeface::CreateFromName(name,
|
||||||
|
Loading…
Reference in New Issue
Block a user