Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 616923004: Create MSAA render target for blur mask texture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 6eaed8982843e910f7ba3a039b8658c7cc5af31b..6a9c31de3f77e54cabec91c1e06029cbbac280db 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -21,6 +21,7 @@
#include "GrRecordReplaceDraw.h"
#include "GrStrokeInfo.h"
#include "GrTracing.h"
+#include "GrGpu.h"
#include "SkGrTexturePixelRef.h"
@@ -643,15 +644,19 @@ bool create_mask_GPU(GrContext* context,
const SkPath& devPath,
const GrStrokeInfo& strokeInfo,
bool doAA,
- GrAutoScratchTexture* mask) {
+ GrAutoScratchTexture* mask,
+ int SampleCnt) {
GrTextureDesc desc;
desc.fFlags = kRenderTarget_GrTextureFlagBit;
desc.fWidth = SkScalarCeilToInt(maskRect.width());
desc.fHeight = SkScalarCeilToInt(maskRect.height());
+ desc.fSampleCnt = SampleCnt;
// We actually only need A8, but it often isn't supported as a
// render target so default to RGBA_8888
desc.fConfig = kRGBA_8888_GrPixelConfig;
- if (context->isConfigRenderable(kAlpha_8_GrPixelConfig, false)) {
+
+ if (context->isConfigRenderable(kAlpha_8_GrPixelConfig,
+ desc.fSampleCnt > 0)) {
desc.fConfig = kAlpha_8_GrPixelConfig;
}
@@ -785,7 +790,7 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
GrAutoScratchTexture mask;
if (create_mask_GPU(fContext, maskRect, *devPathPtr, strokeInfo,
- grPaint.isAntiAlias(), &mask)) {
+ grPaint.isAntiAlias(), &mask, fRenderTarget->numSamples())) {
GrTexture* filtered;
if (paint.getMaskFilter()->filterMaskGPU(mask.texture(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698