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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 16173003: use SkStream factory for files, and check for null (file-not-found) speedup sampleapp's animation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | samplecode/SamplePicture.cpp » ('j') | 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 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 #define USE_ARROWS_FOR_ZOOM true 68 #define USE_ARROWS_FOR_ZOOM true
69 69
70 #if SK_ANGLE 70 #if SK_ANGLE
71 //#define DEFAULT_TO_ANGLE 1 71 //#define DEFAULT_TO_ANGLE 1
72 #else 72 #else
73 //#define DEFAULT_TO_GPU 1 73 //#define DEFAULT_TO_GPU 1
74 #endif 74 #endif
75 75
76 #define ANIMATING_EVENTTYPE "nextSample" 76 #define ANIMATING_EVENTTYPE "nextSample"
77 #define ANIMATING_DELAY 750 77 #define ANIMATING_DELAY 250
78 78
79 #ifdef SK_DEBUG 79 #ifdef SK_DEBUG
80 #define FPS_REPEAT_MULTIPLIER 1 80 #define FPS_REPEAT_MULTIPLIER 1
81 #else 81 #else
82 #define FPS_REPEAT_MULTIPLIER 10 82 #define FPS_REPEAT_MULTIPLIER 10
83 #endif 83 #endif
84 #define FPS_REPEAT_COUNT (10 * FPS_REPEAT_MULTIPLIER) 84 #define FPS_REPEAT_COUNT (10 * FPS_REPEAT_MULTIPLIER)
85 85
86 static SampleWindow* gSampleWindow; 86 static SampleWindow* gSampleWindow;
87 87
(...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after
2455 SkGraphics::Init(); 2455 SkGraphics::Init();
2456 SkEvent::Init(); 2456 SkEvent::Init();
2457 } 2457 }
2458 2458
2459 // FIXME: this should be in a header 2459 // FIXME: this should be in a header
2460 void application_term(); 2460 void application_term();
2461 void application_term() { 2461 void application_term() {
2462 SkEvent::Term(); 2462 SkEvent::Term();
2463 SkGraphics::Term(); 2463 SkGraphics::Term();
2464 } 2464 }
OLDNEW
« no previous file with comments | « no previous file | samplecode/SamplePicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698