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

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

Issue 926593005: Use SkXfermode as public facing enum for GrPorterDuffXP (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 678
679 GrPaint tempPaint; 679 GrPaint tempPaint;
680 if (doAA) { 680 if (doAA) {
681 tempPaint.setAntiAlias(true); 681 tempPaint.setAntiAlias(true);
682 // AA uses the "coverage" stages on GrDrawTarget. Coverage with a dst 682 // AA uses the "coverage" stages on GrDrawTarget. Coverage with a dst
683 // blend coeff of zero requires dual source blending support in order 683 // blend coeff of zero requires dual source blending support in order
684 // to properly blend partially covered pixels. This means the AA 684 // to properly blend partially covered pixels. This means the AA
685 // code path may not be taken. So we use a dst blend coeff of ISA. We 685 // code path may not be taken. So we use a dst blend coeff of ISA. We
686 // could special case AA draws to a dst surface with known alpha=0 to 686 // could special case AA draws to a dst surface with known alpha=0 to
687 // use a zero dst coeff when dual source blending isn't available. 687 // use a zero dst coeff when dual source blending isn't available.
688 tempPaint.setPorterDuffXPFactory(kOne_GrBlendCoeff, kISC_GrBlendCoeff); 688 tempPaint.setPorterDuffXPFactory(SkXfermode::kOne_Coeff, SkXfermode::kIS C_Coeff);
689 } 689 }
690 690
691 // Draw the mask into maskTexture with the path's top-left at the origin usi ng tempPaint. 691 // Draw the mask into maskTexture with the path's top-left at the origin usi ng tempPaint.
692 SkMatrix translate; 692 SkMatrix translate;
693 translate.setTranslate(-maskRect.fLeft, -maskRect.fTop); 693 translate.setTranslate(-maskRect.fLeft, -maskRect.fTop);
694 context->drawPath(tempPaint, translate, devPath, strokeInfo); 694 context->drawPath(tempPaint, translate, devPath, strokeInfo);
695 return mask; 695 return mask;
696 } 696 }
697 697
698 SkBitmap wrap_texture(GrTexture* texture) { 698 SkBitmap wrap_texture(GrTexture* texture) {
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 #endif 1904 #endif
1905 } 1905 }
1906 1906
1907 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1907 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1908 // We always return a transient cache, so it is freed after each 1908 // We always return a transient cache, so it is freed after each
1909 // filter traversal. 1909 // filter traversal.
1910 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1910 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1911 } 1911 }
1912 1912
1913 #endif 1913 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698