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 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 this->inval(NULL); | 1530 this->inval(NULL); |
1531 } | 1531 } |
1532 } | 1532 } |
1533 | 1533 |
1534 void SampleWindow::afterChild(SkView* child, SkCanvas* canvas) { | 1534 void SampleWindow::afterChild(SkView* child, SkCanvas* canvas) { |
1535 canvas->setDrawFilter(NULL); | 1535 canvas->setDrawFilter(NULL); |
1536 } | 1536 } |
1537 | 1537 |
1538 static SkBitmap::Config gConfigCycle[] = { | 1538 static SkBitmap::Config gConfigCycle[] = { |
1539 SkBitmap::kNo_Config, // none -> none | 1539 SkBitmap::kNo_Config, // none -> none |
1540 SkBitmap::kNo_Config, // a1 -> none | |
1541 SkBitmap::kNo_Config, // a8 -> none | 1540 SkBitmap::kNo_Config, // a8 -> none |
1542 SkBitmap::kNo_Config, // index8 -> none | 1541 SkBitmap::kNo_Config, // index8 -> none |
1543 SkBitmap::kARGB_4444_Config, // 565 -> 4444 | 1542 SkBitmap::kARGB_4444_Config, // 565 -> 4444 |
1544 SkBitmap::kARGB_8888_Config, // 4444 -> 8888 | 1543 SkBitmap::kARGB_8888_Config, // 4444 -> 8888 |
1545 SkBitmap::kRGB_565_Config // 8888 -> 565 | 1544 SkBitmap::kRGB_565_Config // 8888 -> 565 |
1546 }; | 1545 }; |
1547 | 1546 |
1548 static SkBitmap::Config cycle_configs(SkBitmap::Config c) { | 1547 static SkBitmap::Config cycle_configs(SkBitmap::Config c) { |
1549 return gConfigCycle[c]; | 1548 return gConfigCycle[c]; |
1550 } | 1549 } |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2067 | 2066 |
2068 (void)SampleView::SetUsePipe(view, fPipeState); | 2067 (void)SampleView::SetUsePipe(view, fPipeState); |
2069 if (SampleView::IsSampleView(view)) | 2068 if (SampleView::IsSampleView(view)) |
2070 ((SampleView*)view)->requestMenu(fSlideMenu); | 2069 ((SampleView*)view)->requestMenu(fSlideMenu); |
2071 this->onUpdateMenu(fSlideMenu); | 2070 this->onUpdateMenu(fSlideMenu); |
2072 this->updateTitle(); | 2071 this->updateTitle(); |
2073 } | 2072 } |
2074 | 2073 |
2075 static const char* gConfigNames[] = { | 2074 static const char* gConfigNames[] = { |
2076 "unknown config", | 2075 "unknown config", |
2077 "A1", | |
2078 "A8", | 2076 "A8", |
2079 "Index8", | 2077 "Index8", |
2080 "565", | 2078 "565", |
2081 "4444", | 2079 "4444", |
2082 "8888" | 2080 "8888" |
2083 }; | 2081 }; |
2084 | 2082 |
2085 static const char* configToString(SkBitmap::Config c) { | 2083 static const char* configToString(SkBitmap::Config c) { |
2086 return gConfigNames[c]; | 2084 return gConfigNames[c]; |
2087 } | 2085 } |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2550 SkGraphics::Init(); | 2548 SkGraphics::Init(); |
2551 SkEvent::Init(); | 2549 SkEvent::Init(); |
2552 } | 2550 } |
2553 | 2551 |
2554 // FIXME: this should be in a header | 2552 // FIXME: this should be in a header |
2555 void application_term(); | 2553 void application_term(); |
2556 void application_term() { | 2554 void application_term() { |
2557 SkEvent::Term(); | 2555 SkEvent::Term(); |
2558 SkGraphics::Term(); | 2556 SkGraphics::Term(); |
2559 } | 2557 } |
OLD | NEW |