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

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 639523002: Only use msaa target for blur mask when doAA is true (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 unified diff | Download patch
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 const SkRect& maskRect, 629 const SkRect& maskRect,
630 const SkPath& devPath, 630 const SkPath& devPath,
631 const GrStrokeInfo& strokeInfo, 631 const GrStrokeInfo& strokeInfo,
632 bool doAA, 632 bool doAA,
633 GrAutoScratchTexture* mask, 633 GrAutoScratchTexture* mask,
634 int SampleCnt) { 634 int SampleCnt) {
635 GrTextureDesc desc; 635 GrTextureDesc desc;
636 desc.fFlags = kRenderTarget_GrTextureFlagBit; 636 desc.fFlags = kRenderTarget_GrTextureFlagBit;
637 desc.fWidth = SkScalarCeilToInt(maskRect.width()); 637 desc.fWidth = SkScalarCeilToInt(maskRect.width());
638 desc.fHeight = SkScalarCeilToInt(maskRect.height()); 638 desc.fHeight = SkScalarCeilToInt(maskRect.height());
639 desc.fSampleCnt = SampleCnt; 639 desc.fSampleCnt = doAA ? SampleCnt : 0;
640 // We actually only need A8, but it often isn't supported as a 640 // We actually only need A8, but it often isn't supported as a
641 // render target so default to RGBA_8888 641 // render target so default to RGBA_8888
642 desc.fConfig = kRGBA_8888_GrPixelConfig; 642 desc.fConfig = kRGBA_8888_GrPixelConfig;
643 643
644 if (context->isConfigRenderable(kAlpha_8_GrPixelConfig, 644 if (context->isConfigRenderable(kAlpha_8_GrPixelConfig,
645 desc.fSampleCnt > 0)) { 645 desc.fSampleCnt > 0)) {
646 desc.fConfig = kAlpha_8_GrPixelConfig; 646 desc.fConfig = kAlpha_8_GrPixelConfig;
647 } 647 }
648 648
649 mask->set(context, desc); 649 mask->set(context, desc);
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), atlased, nonAtlased, recycled); 1860 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), atlased, nonAtlased, recycled);
1861 1861
1862 return true; 1862 return true;
1863 } 1863 }
1864 1864
1865 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1865 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1866 // We always return a transient cache, so it is freed after each 1866 // We always return a transient cache, so it is freed after each
1867 // filter traversal. 1867 // filter traversal.
1868 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1868 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1869 } 1869 }
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698