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

Unified Diff: experimental/Intersection/EdgeDemoApp.mm

Issue 867213004: remove prototype pathops code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/Intersection/EdgeDemo.cpp ('k') | experimental/Intersection/EdgeDemoApp.xib » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/Intersection/EdgeDemoApp.mm
diff --git a/experimental/Intersection/EdgeDemoApp.mm b/experimental/Intersection/EdgeDemoApp.mm
deleted file mode 100644
index 7c50fea617145f244e98a6d8f5a3416750e460fa..0000000000000000000000000000000000000000
--- a/experimental/Intersection/EdgeDemoApp.mm
+++ /dev/null
@@ -1,94 +0,0 @@
-#include "EdgeDemo.h"
-#import "SkCanvas.h"
-#import "SkWindow.h"
-#include "SkGraphics.h"
-#include "SkCGUtils.h"
-
-#include <time.h>
-#include <sys/time.h>
-
-class SkSampleView : public SkView {
-public:
- SkSampleView() {
- this->setVisibleP(true);
- this->setClipToBounds(false);
- useOld = false;
- };
-protected:
- virtual void onDraw(SkCanvas* canvas) {
- static int step = 0; // 17907 drawLetters first error
- // drawStars triggers error at 33348
- // drawStars error not easy to debug last time I checked
- static double seconds;
- if (step == -1) {
- timeval t;
- gettimeofday(&t, NULL);
- seconds = t.tv_sec+t.tv_usec/1000000.0;
- step = 0;
- }
- canvas->drawColor(SK_ColorWHITE);
- if (DrawEdgeDemo(canvas, step, useOld)) {
- ++step;
- if (step == -1) {
- timeval t;
- gettimeofday(&t, NULL);
- double last = seconds;
- seconds = t.tv_sec+t.tv_usec/1000000.0;
- SkDebugf("old=%d seconds=%g\n", useOld, seconds - last);
- useOld ^= true;
- step = 0;
- }
- inval(NULL);
- }
- }
-
- virtual Click* onFindClickHandler(SkScalar , SkScalar ) {
- useOld ^= true;
- return NULL;
- }
-
-private:
- bool useOld;
- typedef SkView INHERITED;
-};
-
-void application_init();
-void application_term();
-
-void application_init() {
- SkGraphics::Init();
- SkEvent::Init();
-}
-
-void application_term() {
- SkGraphics::Term();
- SkEvent::Term();
-}
-
-class FillLayout : public SkView::Layout {
-protected:
- virtual void onLayoutChildren(SkView* parent) {
- SkView* view = SkView::F2BIter(parent).next();
- view->setSize(parent->width(), parent->height());
- }
-};
-
-#import "SimpleApp.h"
-
-@implementation SimpleNSView
-
-- (id)initWithDefaults {
- if ((self = [super initWithDefaults])) {
- fWind = new SkOSWindow(self);
- fWind->setLayout(new FillLayout, false);
- fWind->attachChildToFront(new SkSampleView)->unref();
- }
- return self;
-}
-
-- (void)drawRect:(NSRect)dirtyRect {
- CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
- SkCGDrawBitmap(ctx, fWind->getBitmap(), 0, 0);
-}
-
-@end
« no previous file with comments | « experimental/Intersection/EdgeDemo.cpp ('k') | experimental/Intersection/EdgeDemoApp.xib » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698