| 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 #include "SampleApp.h" | 7 #include "SampleApp.h" |
| 8 | 8 |
| 9 #include "SkData.h" | 9 #include "SkData.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 , fHintingState(hinting) {} | 498 , fHintingState(hinting) {} |
| 499 | 499 |
| 500 virtual bool filter(SkPaint* paint, Type t) { | 500 virtual bool filter(SkPaint* paint, Type t) { |
| 501 if (kText_Type == t && SkOSMenu::kMixedState != fLCDState) { | 501 if (kText_Type == t && SkOSMenu::kMixedState != fLCDState) { |
| 502 paint->setLCDRenderText(SkOSMenu::kOnState == fLCDState); | 502 paint->setLCDRenderText(SkOSMenu::kOnState == fLCDState); |
| 503 } | 503 } |
| 504 if (SkOSMenu::kMixedState != fAAState) { | 504 if (SkOSMenu::kMixedState != fAAState) { |
| 505 paint->setAntiAlias(SkOSMenu::kOnState == fAAState); | 505 paint->setAntiAlias(SkOSMenu::kOnState == fAAState); |
| 506 } | 506 } |
| 507 if (SkOSMenu::kMixedState != fFilterState) { | 507 if (SkOSMenu::kMixedState != fFilterState) { |
| 508 paint->setFilterBitmap(SkOSMenu::kOnState == fFilterState); | 508 paint->setFilterLevel(SkOSMenu::kOnState == fFilterState ? |
| 509 SkPaint::kLow_FilterLevel : SkPaint::kNone_Fil
terLevel); |
| 509 } | 510 } |
| 510 if (SkOSMenu::kMixedState != fSubpixelState) { | 511 if (SkOSMenu::kMixedState != fSubpixelState) { |
| 511 paint->setSubpixelText(SkOSMenu::kOnState == fSubpixelState); | 512 paint->setSubpixelText(SkOSMenu::kOnState == fSubpixelState); |
| 512 } | 513 } |
| 513 if (0 != fHintingState && fHintingState < (int)SK_ARRAY_COUNT(gHintingSt
ates)) { | 514 if (0 != fHintingState && fHintingState < (int)SK_ARRAY_COUNT(gHintingSt
ates)) { |
| 514 paint->setHinting(gHintingStates[fHintingState].hinting); | 515 paint->setHinting(gHintingStates[fHintingState].hinting); |
| 515 } | 516 } |
| 516 return true; | 517 return true; |
| 517 } | 518 } |
| 518 | 519 |
| (...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2549 SkGraphics::Init(); | 2550 SkGraphics::Init(); |
| 2550 SkEvent::Init(); | 2551 SkEvent::Init(); |
| 2551 } | 2552 } |
| 2552 | 2553 |
| 2553 // FIXME: this should be in a header | 2554 // FIXME: this should be in a header |
| 2554 void application_term(); | 2555 void application_term(); |
| 2555 void application_term() { | 2556 void application_term() { |
| 2556 SkEvent::Term(); | 2557 SkEvent::Term(); |
| 2557 SkGraphics::Term(); | 2558 SkGraphics::Term(); |
| 2558 } | 2559 } |
| OLD | NEW |