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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 23453031: Rewrite SkTRegistry to take any trivially-copyable type. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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
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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // registers GMs as Samples 421 // registers GMs as Samples
422 // This can't be performed during static initialization because it could be 422 // This can't be performed during static initialization because it could be
423 // run before GMRegistry has been fully built. 423 // run before GMRegistry has been fully built.
424 static void SkGMRegistyToSampleRegistry() { 424 static void SkGMRegistyToSampleRegistry() {
425 static bool gOnce; 425 static bool gOnce;
426 static AutoUnrefArray fRegisters; 426 static AutoUnrefArray fRegisters;
427 427
428 if (!gOnce) { 428 if (!gOnce) {
429 const skiagm::GMRegistry* gmreg = skiagm::GMRegistry::Head(); 429 const skiagm::GMRegistry* gmreg = skiagm::GMRegistry::Head();
430 while (gmreg) { 430 while (gmreg) {
431 fRegisters.push_back() = new SkViewRegister(gmreg->factory()); 431 fRegisters.push_back() = new SkViewRegister(gmreg->data());
432 gmreg = gmreg->next(); 432 gmreg = gmreg->next();
433 } 433 }
434 gOnce = true; 434 gOnce = true;
435 } 435 }
436 } 436 }
437 437
438 #if 0 438 #if 0
439 #include <CoreFoundation/CoreFoundation.h> 439 #include <CoreFoundation/CoreFoundation.h>
440 #include <CoreFoundation/CFURLAccess.h> 440 #include <CoreFoundation/CFURLAccess.h>
441 441
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2545 SkGraphics::Init(); 2545 SkGraphics::Init();
2546 SkEvent::Init(); 2546 SkEvent::Init();
2547 } 2547 }
2548 2548
2549 // FIXME: this should be in a header 2549 // FIXME: this should be in a header
2550 void application_term(); 2550 void application_term();
2551 void application_term() { 2551 void application_term() {
2552 SkEvent::Term(); 2552 SkEvent::Term();
2553 SkGraphics::Term(); 2553 SkGraphics::Term();
2554 } 2554 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698