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

Side by Side Diff: include/core/SkCanvas.h

Issue 1116453002: onCreateDevice -> NULL now means the caller should create its own (bitmap) device (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 5 years, 7 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
« no previous file with comments | « no previous file | include/core/SkDevice.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 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 1250
1251 private: 1251 private:
1252 class MCRec; 1252 class MCRec;
1253 1253
1254 SkAutoTUnref<SkClipStack> fClipStack; 1254 SkAutoTUnref<SkClipStack> fClipStack;
1255 SkDeque fMCStack; 1255 SkDeque fMCStack;
1256 // points to top of stack 1256 // points to top of stack
1257 MCRec* fMCRec; 1257 MCRec* fMCRec;
1258 // the first N recs that can fit here mean we won't call malloc 1258 // the first N recs that can fit here mean we won't call malloc
1259 enum { 1259 enum {
1260 kMCRecSize = 128, // most recent measurement 1260 kMCRecSize = 136, // most recent measurement
1261 kMCRecCount = 8, // common depth for save/restores 1261 kMCRecCount = 8, // common depth for save/restores
1262 }; 1262 };
1263 intptr_t fMCRecStorage[kMCRecSize * kMCRecCount / sizeof(intptr_t)]; 1263 intptr_t fMCRecStorage[kMCRecSize * kMCRecCount / sizeof(intptr_t)];
1264 // for our base DeviceCM 1264 // for our base DeviceCM
1265 intptr_t fBaseLayerStorage[kMCRecSize / sizeof(intptr_t)]; 1265 intptr_t fBaseLayerStorage[kMCRecSize / sizeof(intptr_t)];
1266 1266
1267 const SkSurfaceProps fProps; 1267 const SkSurfaceProps fProps;
1268 1268
1269 int fSaveCount; // value returned by getSaveCount() 1269 int fSaveCount; // value returned by getSaveCount()
1270 1270
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 // internal methods are not virtual, so they can safely be called by other 1323 // internal methods are not virtual, so they can safely be called by other
1324 // canvas apis, without confusing subclasses (like SkPictureRecording) 1324 // canvas apis, without confusing subclasses (like SkPictureRecording)
1325 void internalDrawBitmap(const SkBitmap&, const SkMatrix& m, const SkPaint* p aint); 1325 void internalDrawBitmap(const SkBitmap&, const SkMatrix& m, const SkPaint* p aint);
1326 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, 1326 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
1327 const SkRect& dst, const SkPaint* paint, 1327 const SkRect& dst, const SkPaint* paint,
1328 DrawBitmapRectFlags flags); 1328 DrawBitmapRectFlags flags);
1329 void internalDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 1329 void internalDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
1330 const SkRect& dst, const SkPaint* paint); 1330 const SkRect& dst, const SkPaint* paint);
1331 void internalDrawPaint(const SkPaint& paint); 1331 void internalDrawPaint(const SkPaint& paint);
1332 void internalSaveLayer(const SkRect* bounds, const SkPaint*, SaveFlags, Save LayerStrategy); 1332 void internalSaveLayer(const SkRect* bounds, const SkPaint*, SaveFlags, Save LayerStrategy);
1333 void internalDrawDevice(SkBaseDevice*, int x, int y, const SkPaint*); 1333 void internalDrawDevice(SkBaseDevice*, int x, int y, const SkPaint*, bool is BitmapDevice);
1334 1334
1335 // shared by save() and saveLayer() 1335 // shared by save() and saveLayer()
1336 void internalSave(); 1336 void internalSave();
1337 void internalRestore(); 1337 void internalRestore();
1338 static void DrawRect(const SkDraw& draw, const SkPaint& paint, 1338 static void DrawRect(const SkDraw& draw, const SkPaint& paint,
1339 const SkRect& r, SkScalar textSize); 1339 const SkRect& r, SkScalar textSize);
1340 static void DrawTextDecorations(const SkDraw& draw, const SkPaint& paint, 1340 static void DrawTextDecorations(const SkDraw& draw, const SkPaint& paint,
1341 const char text[], size_t byteLength, 1341 const char text[], size_t byteLength,
1342 SkScalar x, SkScalar y); 1342 SkScalar x, SkScalar y);
1343 1343
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 1498
1499 class SkCanvasClipVisitor { 1499 class SkCanvasClipVisitor {
1500 public: 1500 public:
1501 virtual ~SkCanvasClipVisitor(); 1501 virtual ~SkCanvasClipVisitor();
1502 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1502 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1503 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1503 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1504 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1504 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1505 }; 1505 };
1506 1506
1507 #endif 1507 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698