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

Side by Side Diff: experimental/SimpleCocoaApp/SimpleApp.mm

Issue 35543002: Revert "If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get be… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | « experimental/PdfViewer/SkNulCanvas.h ('k') | include/core/SkCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "SkCanvas.h" 1 #include "SkCanvas.h"
2 #include "SkCGUtils.h" 2 #include "SkCGUtils.h"
3 #include "SkGraphics.h" 3 #include "SkGraphics.h"
4 #include "SkImageDecoder.h" 4 #include "SkImageDecoder.h"
5 #include "SkOSFile.h" 5 #include "SkOSFile.h"
6 #include "SkPaint.h" 6 #include "SkPaint.h"
7 #include "SkPicture.h" 7 #include "SkPicture.h"
8 #include "SkStream.h" 8 #include "SkStream.h"
9 #include "SkWindow.h" 9 #include "SkWindow.h"
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 default: 128 default:
129 SkDEBUGFAIL("bad verb"); 129 SkDEBUGFAIL("bad verb");
130 SkASSERT(0); 130 SkASSERT(0);
131 return 0; 131 return 0;
132 } 132 }
133 } 133 }
134 return moves; 134 return moves;
135 } 135 }
136 136
137 class PathCanvas : public SkCanvas { 137 class PathCanvas : public SkCanvas {
138 virtual void onDrawPath(const SkPath& path, const SkPaint& paint) { 138 virtual void drawPath(const SkPath& path, const SkPaint& paint) {
139 if (nameonly) { 139 if (nameonly) {
140 SkDebugf(" %s%d,\n", filename.c_str(), ++count); 140 SkDebugf(" %s%d,\n", filename.c_str(), ++count);
141 return; 141 return;
142 } 142 }
143 SkPath::Iter iter(path, true); 143 SkPath::Iter iter(path, true);
144 SkDebugf("<div id=\"%s%d\">\n", filename.c_str(), ++count); 144 SkDebugf("<div id=\"%s%d\">\n", filename.c_str(), ++count);
145 SkASSERT(path.getFillType() < SkPath::kInverseWinding_FillType); 145 SkASSERT(path.getFillType() < SkPath::kInverseWinding_FillType);
146 SkDebugf("path.setFillType(SkPath::k%s_FillType);\n", 146 SkDebugf("path.setFillType(SkPath::k%s_FillType);\n",
147 path.getFillType() == SkPath::kWinding_FillType ? "Winding" : "EvenO dd"); 147 path.getFillType() == SkPath::kWinding_FillType ? "Winding" : "EvenO dd");
148 int contours = showPathContour(iter); 148 int contours = showPathContour(iter);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 297 }
298 return self; 298 return self;
299 } 299 }
300 300
301 - (void)drawRect:(NSRect)dirtyRect { 301 - (void)drawRect:(NSRect)dirtyRect {
302 CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphic sPort]; 302 CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphic sPort];
303 SkCGDrawBitmap(ctx, fWind->getBitmap(), 0, 0); 303 SkCGDrawBitmap(ctx, fWind->getBitmap(), 0, 0);
304 } 304 }
305 305
306 @end 306 @end
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkNulCanvas.h ('k') | include/core/SkCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698