OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #include "SampleSlide.h" |
| 9 |
| 10 #include "SkCanvas.h" |
| 11 #include "SkCommonFlags.h" |
| 12 #include "SkOSFile.h" |
| 13 #include "SkStream.h" |
| 14 |
| 15 SampleSlide::SampleSlide(const SkViewFactory* factory) : fViewFactory(factory) { |
| 16 SkView* view = (*factory)(); |
| 17 SampleCode::RequestTitle(view, &fName); |
| 18 view->unref(); |
| 19 } |
| 20 |
| 21 SampleSlide::~SampleSlide() {} |
| 22 |
| 23 void SampleSlide::draw(SkCanvas* canvas) { |
| 24 fView->draw(canvas); |
| 25 } |
| 26 |
| 27 void SampleSlide::load(SkScalar winWidth, SkScalar winHeight) { |
| 28 fView = (*fViewFactory)(); |
| 29 fView->setVisibleP(true); |
| 30 fView->setClipToBounds(false); |
| 31 fView->setSize(winWidth, winHeight); |
| 32 } |
| 33 |
| 34 void SampleSlide::unload() { |
| 35 fView->unref(); |
| 36 fView = nullptr; |
| 37 } |
| 38 |
| 39 #if defined(SK_BUILD_FOR_ANDROID) |
| 40 // these are normally defined in SkOSWindow_unix, but we don't |
| 41 // want to include that |
| 42 void SkEvent::SignalNonEmptyQueue() {} |
| 43 |
| 44 void SkEvent::SignalQueueTimer(SkMSec delay) {} |
| 45 #endif |
OLD | NEW |