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

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

Issue 831333002: Rebase perspective gpu gm's after conic change (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add support for resources on android Viewer Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 "Viewer.h" 8 #include "Viewer.h"
9 9
10 #include "GMSlide.h" 10 #include "GMSlide.h"
11 #include "ImageSlide.h" 11 #include "ImageSlide.h"
12 #include "Resources.h"
12 #include "SampleSlide.h" 13 #include "SampleSlide.h"
13 #include "SKPSlide.h" 14 #include "SKPSlide.h"
14 15
15 #include "SkATrace.h" 16 #include "SkATrace.h"
16 #include "SkCanvas.h" 17 #include "SkCanvas.h"
17 #include "SkCommandLineFlags.h" 18 #include "SkCommandLineFlags.h"
18 #include "SkDashPathEffect.h" 19 #include "SkDashPathEffect.h"
19 #include "SkGraphics.h" 20 #include "SkGraphics.h"
20 #include "SkMetaData.h" 21 #include "SkMetaData.h"
21 #include "SkOSFile.h" 22 #include "SkOSFile.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 SkGraphics::Init(); 132 SkGraphics::Init();
132 memset(fMeasurements, 0, sizeof(fMeasurements)); 133 memset(fMeasurements, 0, sizeof(fMeasurements));
133 134
134 SkDebugf("Command line arguments: "); 135 SkDebugf("Command line arguments: ");
135 for (int i = 1; i < argc; ++i) { 136 for (int i = 1; i < argc; ++i) {
136 SkDebugf("%s ", argv[i]); 137 SkDebugf("%s ", argv[i]);
137 } 138 }
138 SkDebugf("\n"); 139 SkDebugf("\n");
139 140
140 SkCommandLineFlags::Parse(argc, argv); 141 SkCommandLineFlags::Parse(argc, argv);
142 #ifdef SK_BUILD_FOR_ANDROID
143 SetResourcePath("/data/local/tmp/skia");
144 #endif
141 145
142 if (FLAGS_atrace) { 146 if (FLAGS_atrace) {
143 SkEventTracer::SetInstance(new SkATrace()); 147 SkEventTracer::SetInstance(new SkATrace());
144 } 148 }
145 149
146 fBackendType = get_backend_type(FLAGS_backend[0]); 150 fBackendType = get_backend_type(FLAGS_backend[0]);
147 fWindow = Window::CreateNativeWindow(platformData); 151 fWindow = Window::CreateNativeWindow(platformData);
148 fWindow->attach(fBackendType, DisplayParams()); 152 fWindow->attach(fBackendType, DisplayParams());
149 #if defined(SK_VULKAN) && defined(SK_BUILD_FOR_UNIX) 153 #if defined(SK_VULKAN) && defined(SK_BUILD_FOR_UNIX)
150 // Vulkan doesn't seem to handle a single refresh properly on Linux 154 // Vulkan doesn't seem to handle a single refresh properly on Linux
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 updateUIState(); 668 updateUIState();
665 } 669 }
666 } else if (stateName.equals(kRefreshStateName)) { 670 } else if (stateName.equals(kRefreshStateName)) {
667 // This state is actually NOT in the UI state. 671 // This state is actually NOT in the UI state.
668 // We use this to allow Android to quickly set bool fRefresh. 672 // We use this to allow Android to quickly set bool fRefresh.
669 fRefresh = stateValue.equals(kON); 673 fRefresh = stateValue.equals(kON);
670 } else { 674 } else {
671 SkDebugf("Unknown stateName: %s", stateName.c_str()); 675 SkDebugf("Unknown stateName: %s", stateName.c_str());
672 } 676 }
673 } 677 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698