Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: tools/viewer/SampleSlide.cpp

Issue 2063883002: Revert of Add samples to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/viewer/SampleSlide.h ('k') | tools/viewer/Slide.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « tools/viewer/SampleSlide.h ('k') | tools/viewer/Slide.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698