OLD | NEW |
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 #ifndef UNICODE | 8 #ifndef UNICODE |
9 #define UNICODE | 9 #define UNICODE |
10 #endif | 10 #endif |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 info.fColorOffsets = NULL; | 943 info.fColorOffsets = NULL; |
944 SkShader::GradientType gradientType = shader->asAGradient(&info); | 944 SkShader::GradientType gradientType = shader->asAGradient(&info); |
945 | 945 |
946 if (SkShader::kNone_GradientType == gradientType) { | 946 if (SkShader::kNone_GradientType == gradientType) { |
947 //Nothing to see, move along. | 947 //Nothing to see, move along. |
948 | 948 |
949 } else if (SkShader::kColor_GradientType == gradientType) { | 949 } else if (SkShader::kColor_GradientType == gradientType) { |
950 SkASSERT(1 == info.fColorCount); | 950 SkASSERT(1 == info.fColorCount); |
951 SkColor color; | 951 SkColor color; |
952 info.fColors = &color; | 952 info.fColors = &color; |
953 SkShader::GradientType gradientType = shader->asAGradient(&info); | 953 shader->asAGradient(&info); |
954 SkAlpha alpha = skPaint.getAlpha(); | 954 SkAlpha alpha = skPaint.getAlpha(); |
955 HR(this->createXpsSolidColorBrush(color, alpha, brush)); | 955 HR(this->createXpsSolidColorBrush(color, alpha, brush)); |
956 return S_OK; | 956 return S_OK; |
957 | 957 |
958 } else { | 958 } else { |
959 if (info.fColorCount == 0) { | 959 if (info.fColorCount == 0) { |
960 const SkColor color = skPaint.getColor(); | 960 const SkColor color = skPaint.getColor(); |
961 HR(this->createXpsSolidColorBrush(color, 0xFF, brush)); | 961 HR(this->createXpsSolidColorBrush(color, 0xFF, brush)); |
962 return S_OK; | 962 return S_OK; |
963 } | 963 } |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2410 IID_PPV_ARGS(&this->fXpsFactory)), | 2410 IID_PPV_ARGS(&this->fXpsFactory)), |
2411 "Could not create factory for layer."); | 2411 "Could not create factory for layer."); |
2412 | 2412 |
2413 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), | 2413 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
2414 "Could not create canvas for layer."); | 2414 "Could not create canvas for layer."); |
2415 } | 2415 } |
2416 | 2416 |
2417 bool SkXPSDevice::allowImageFilter(SkImageFilter*) { | 2417 bool SkXPSDevice::allowImageFilter(SkImageFilter*) { |
2418 return false; | 2418 return false; |
2419 } | 2419 } |
OLD | NEW |