зеркало из https://github.com/mozilla/moz-skia.git
Fix for 2 parallel gpu rendering issues (bigbitmaprect & image-surface)
https://codereview.appspot.com/6816079/ git-svn-id: http://skia.googlecode.com/svn/trunk@6266 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
ee5ea6b8e0
Коммит
ea5d8af9fb
|
@ -40,7 +40,7 @@ void GM::setBGColor(SkColor color) {
|
|||
}
|
||||
|
||||
void GM::onDrawBackground(SkCanvas* canvas) {
|
||||
canvas->drawColor(fBGColor);
|
||||
canvas->drawColor(fBGColor, SkXfermode::kSrc_Mode);
|
||||
}
|
||||
|
||||
void GM::drawSizeBounds(SkCanvas* canvas, SkColor color) {
|
||||
|
|
|
@ -616,7 +616,7 @@ inline bool skPaint2GrPaintShader(SkGpuDevice* dev,
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void SkGpuDevice::clear(SkColor color) {
|
||||
fContext->clear(NULL, color, fRenderTarget);
|
||||
fContext->clear(NULL, SkColor2GrColor(color), fRenderTarget);
|
||||
fNeedClear = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,11 +42,19 @@ SkSurface_Gpu::SkSurface_Gpu(GrContext* ctx, const SkImage::Info& info,
|
|||
SkBitmap::Config config = SkImageInfoToBitmapConfig(info, &isOpaque);
|
||||
|
||||
fDevice = SkNEW_ARGS(SkGpuDevice, (ctx, config, info.fWidth, info.fHeight, sampleCount));
|
||||
|
||||
if (!isOpaque) {
|
||||
fDevice->clear(0x0);
|
||||
}
|
||||
}
|
||||
|
||||
SkSurface_Gpu::SkSurface_Gpu(GrContext* ctx, GrRenderTarget* renderTarget)
|
||||
: INHERITED(renderTarget->width(), renderTarget->height()) {
|
||||
fDevice = SkNEW_ARGS(SkGpuDevice, (ctx, renderTarget));
|
||||
|
||||
if (kRGB_565_GrPixelConfig != renderTarget->config()) {
|
||||
fDevice->clear(0x0);
|
||||
}
|
||||
}
|
||||
|
||||
SkSurface_Gpu::~SkSurface_Gpu() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче