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 #include "SampleApp.h" | 8 #include "SampleApp.h" |
9 | 9 |
10 #include "OverView.h" | 10 #include "OverView.h" |
11 #include "Resources.h" | 11 #include "Resources.h" |
12 #include "SampleCode.h" | 12 #include "SampleCode.h" |
13 #include "SkAnimTimer.h" | 13 #include "SkAnimTimer.h" |
14 #include "SkCanvas.h" | 14 #include "SkCanvas.h" |
15 #include "SkColorSpace_Base.h" | 15 #include "SkColorSpace_XYZTRC.h" |
16 #include "SkCommandLineFlags.h" | 16 #include "SkCommandLineFlags.h" |
17 #include "SkData.h" | 17 #include "SkData.h" |
18 #include "SkDocument.h" | 18 #include "SkDocument.h" |
19 #include "SkGammaColorFilter.h" | 19 #include "SkGammaColorFilter.h" |
20 #include "SkGraphics.h" | 20 #include "SkGraphics.h" |
21 #include "SkImage_Base.h" | 21 #include "SkImage_Base.h" |
22 #include "SkImageEncoder.h" | 22 #include "SkImageEncoder.h" |
23 #include "SkOSFile.h" | 23 #include "SkOSFile.h" |
24 #include "SkPaint.h" | 24 #include "SkPaint.h" |
25 #include "SkPaintFilterCanvas.h" | 25 #include "SkPaintFilterCanvas.h" |
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1669 colorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Name
d); | 1669 colorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Name
d); |
1670 } | 1670 } |
1671 break; | 1671 break; |
1672 case kLegacy_OutputColorSpace: | 1672 case kLegacy_OutputColorSpace: |
1673 default: | 1673 default: |
1674 // Do nothing | 1674 // Do nothing |
1675 break; | 1675 break; |
1676 } | 1676 } |
1677 if (kRGBA_F16_SkColorType == gConfig[selected].fColorType) { | 1677 if (kRGBA_F16_SkColorType == gConfig[selected].fColorType) { |
1678 SkASSERT(colorSpace); | 1678 SkASSERT(colorSpace); |
1679 colorSpace = as_CSB(colorSpace)->makeLinearGamma(); | 1679 SkASSERT(as_CSB(colorSpace)->toXYZD50()); |
| 1680 SkColorSpace_XYZTRC* csXYZ = static_cast<SkColorSpace_XYZTRC*>(color
Space.get()); |
| 1681 colorSpace = csXYZ->makeLinearGamma(); |
1680 } | 1682 } |
1681 this->setDeviceColorType(gConfig[selected].fColorType, colorSpace); | 1683 this->setDeviceColorType(gConfig[selected].fColorType, colorSpace); |
1682 return true; | 1684 return true; |
1683 } | 1685 } |
1684 if (SkOSMenu::FindSwitchState(evt, "Slide Show", nullptr)) { | 1686 if (SkOSMenu::FindSwitchState(evt, "Slide Show", nullptr)) { |
1685 this->toggleSlideshow(); | 1687 this->toggleSlideshow(); |
1686 return true; | 1688 return true; |
1687 } | 1689 } |
1688 if (SkOSMenu::FindTriState(evt, "AA", &fAAState) || | 1690 if (SkOSMenu::FindTriState(evt, "AA", &fAAState) || |
1689 SkOSMenu::FindTriState(evt, "LCD", &fLCDState) || | 1691 SkOSMenu::FindTriState(evt, "LCD", &fLCDState) || |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 #ifdef SK_BUILD_FOR_MAC | 2399 #ifdef SK_BUILD_FOR_MAC |
2398 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2400 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2399 #endif | 2401 #endif |
2400 SkGraphics::Init(); | 2402 SkGraphics::Init(); |
2401 SkEvent::Init(); | 2403 SkEvent::Init(); |
2402 } | 2404 } |
2403 | 2405 |
2404 void application_term() { | 2406 void application_term() { |
2405 SkEvent::Term(); | 2407 SkEvent::Term(); |
2406 } | 2408 } |
OLD | NEW |