| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright 2010 Google Inc. |    2  * Copyright 2010 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 "SkGr.h" |    8 #include "SkGr.h" | 
|    9  |    9  | 
|   10 #include "GrXferProcessor.h" |   10 #include "GrXferProcessor.h" | 
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  587             return kRGBA_4444_GrPixelConfig; |  587             return kRGBA_4444_GrPixelConfig; | 
|  588         case kRGBA_8888_SkColorType: |  588         case kRGBA_8888_SkColorType: | 
|  589 //            if (kSRGB_SkColorProfileType == pt) { |  589 //            if (kSRGB_SkColorProfileType == pt) { | 
|  590 //                return kSRGBA_8888_GrPixelConfig; |  590 //                return kSRGBA_8888_GrPixelConfig; | 
|  591 //            } |  591 //            } | 
|  592             return kRGBA_8888_GrPixelConfig; |  592             return kRGBA_8888_GrPixelConfig; | 
|  593         case kBGRA_8888_SkColorType: |  593         case kBGRA_8888_SkColorType: | 
|  594             return kBGRA_8888_GrPixelConfig; |  594             return kBGRA_8888_GrPixelConfig; | 
|  595         case kIndex_8_SkColorType: |  595         case kIndex_8_SkColorType: | 
|  596             return kIndex_8_GrPixelConfig; |  596             return kIndex_8_GrPixelConfig; | 
 |  597         case kGray_8_SkColorType: | 
 |  598             return kAlpha_8_GrPixelConfig; // TODO: gray8 support on gpu | 
|  597     } |  599     } | 
|  598     SkASSERT(0);    // shouldn't get here |  600     SkASSERT(0);    // shouldn't get here | 
|  599     return kUnknown_GrPixelConfig; |  601     return kUnknown_GrPixelConfig; | 
|  600 } |  602 } | 
|  601  |  603  | 
|  602 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig config, SkColorType* ctOut, |  604 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig config, SkColorType* ctOut, | 
|  603                                        SkColorProfileType* ptOut) { |  605                                        SkColorProfileType* ptOut) { | 
|  604     SkColorType ct; |  606     SkColorType ct; | 
|  605     SkColorProfileType pt = kLinear_SkColorProfileType; |  607     SkColorProfileType pt = kLinear_SkColorProfileType; | 
|  606     switch (config) { |  608     switch (config) { | 
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  720         if (shader->asFragmentProcessor(context, skPaint, viewM, NULL, &paintCol
     or, &fp) && fp) { |  722         if (shader->asFragmentProcessor(context, skPaint, viewM, NULL, &paintCol
     or, &fp) && fp) { | 
|  721             grPaint->addColorProcessor(fp)->unref(); |  723             grPaint->addColorProcessor(fp)->unref(); | 
|  722             constantColor = false; |  724             constantColor = false; | 
|  723         } |  725         } | 
|  724     } |  726     } | 
|  725  |  727  | 
|  726     // The grcolor is automatically set when calling asFragmentProcessor. |  728     // The grcolor is automatically set when calling asFragmentProcessor. | 
|  727     // If the shader can be seen as an effect it returns true and adds its effec
     t to the grpaint. |  729     // If the shader can be seen as an effect it returns true and adds its effec
     t to the grpaint. | 
|  728     SkPaint2GrPaintNoShader(context, rt, skPaint, paintColor, constantColor, grP
     aint); |  730     SkPaint2GrPaintNoShader(context, rt, skPaint, paintColor, constantColor, grP
     aint); | 
|  729 } |  731 } | 
| OLD | NEW |