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

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

Issue 310113006: Is this SkDebug important? It drives me nuts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | 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 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 } 1644 }
1645 1645
1646 GrPaint grPaint; 1646 GrPaint grPaint;
1647 // we ignore the shader if texs is null. 1647 // we ignore the shader if texs is null.
1648 if (NULL == texs) { 1648 if (NULL == texs) {
1649 SkPaint2GrPaintNoShader(this->context(), paint, false, NULL == colors, & grPaint); 1649 SkPaint2GrPaintNoShader(this->context(), paint, false, NULL == colors, & grPaint);
1650 } else { 1650 } else {
1651 SkPaint2GrPaintShader(this->context(), paint, NULL == colors, &grPaint); 1651 SkPaint2GrPaintShader(this->context(), paint, NULL == colors, &grPaint);
1652 } 1652 }
1653 1653
1654 #if 0
1654 if (NULL != xmode && NULL != texs && NULL != colors) { 1655 if (NULL != xmode && NULL != texs && NULL != colors) {
1655 if (!SkXfermode::IsMode(xmode, SkXfermode::kModulate_Mode)) { 1656 if (!SkXfermode::IsMode(xmode, SkXfermode::kModulate_Mode)) {
1656 SkDebugf("Unsupported vertex-color/texture xfer mode.\n"); 1657 SkDebugf("Unsupported vertex-color/texture xfer mode.\n");
1657 #if 0 1658 return;
1658 return
1659 #endif
1660 } 1659 }
1661 } 1660 }
1661 #endif
1662 1662
1663 SkAutoSTMalloc<128, GrColor> convertedColors(0); 1663 SkAutoSTMalloc<128, GrColor> convertedColors(0);
1664 if (NULL != colors) { 1664 if (NULL != colors) {
1665 // need to convert byte order and from non-PM to PM 1665 // need to convert byte order and from non-PM to PM
1666 convertedColors.reset(vertexCount); 1666 convertedColors.reset(vertexCount);
1667 SkColor color; 1667 SkColor color;
1668 for (int i = 0; i < vertexCount; ++i) { 1668 for (int i = 0; i < vertexCount; ++i) {
1669 color = colors[i]; 1669 color = colors[i];
1670 if (paint.getAlpha() != 255) { 1670 if (paint.getAlpha() != 255) {
1671 color = SkColorSetA(color, SkMulDiv255Round(SkColorGetA(color), paint.getAlpha())); 1671 color = SkColorSetA(color, SkMulDiv255Round(SkColorGetA(color), paint.getAlpha()));
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(pict ure, i); 2006 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(pict ure, i);
2007 2007
2008 if (NULL != layer->getTexture()) { 2008 if (NULL != layer->getTexture()) {
2009 fContext->unlockScratchTexture(layer->getTexture()); 2009 fContext->unlockScratchTexture(layer->getTexture());
2010 layer->setTexture(NULL); 2010 layer->setTexture(NULL);
2011 } 2011 }
2012 } 2012 }
2013 2013
2014 return true; 2014 return true;
2015 } 2015 }
OLDNEW
« 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