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

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

Issue 1016483003: First draft of non-scale/translate filters plus blit optimization. Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | src/core/SkCanvas.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 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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 // need to overload this method. The impl must keep track of this, as it 1235 // need to overload this method. The impl must keep track of this, as it
1236 // is not released or deleted by the caller. 1236 // is not released or deleted by the caller.
1237 virtual SkCanvas* canvasForDrawIter(); 1237 virtual SkCanvas* canvasForDrawIter();
1238 1238
1239 // Clip rectangle bounds. Called internally by saveLayer. 1239 // Clip rectangle bounds. Called internally by saveLayer.
1240 // returns false if the entire rectangle is entirely clipped out 1240 // returns false if the entire rectangle is entirely clipped out
1241 // If non-NULL, The imageFilter parameter will be used to expand the clip 1241 // If non-NULL, The imageFilter parameter will be used to expand the clip
1242 // and offscreen bounds for any margin required by the filter DAG. 1242 // and offscreen bounds for any margin required by the filter DAG.
1243 bool clipRectBounds(const SkRect* bounds, SaveFlags flags, 1243 bool clipRectBounds(const SkRect* bounds, SaveFlags flags,
1244 SkIRect* intersection, 1244 SkIRect* intersection,
1245 const SkImageFilter* imageFilter = NULL); 1245 const SkImageFilter* imageFilter = NULL,
1246 const SkMatrix* extraMatrix = NULL);
1246 1247
1247 // notify our surface (if we have one) that we are about to draw, so it 1248 // notify our surface (if we have one) that we are about to draw, so it
1248 // can perform copy-on-write or invalidate any cached images 1249 // can perform copy-on-write or invalidate any cached images
1249 void predrawNotify(); 1250 void predrawNotify();
1250 1251
1251 private: 1252 private:
1252 class MCRec; 1253 class MCRec;
1253 1254
1254 SkAutoTUnref<SkClipStack> fClipStack; 1255 SkAutoTUnref<SkClipStack> fClipStack;
1255 SkDeque fMCStack; 1256 SkDeque fMCStack;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 // internal methods are not virtual, so they can safely be called by other 1316 // internal methods are not virtual, so they can safely be called by other
1316 // canvas apis, without confusing subclasses (like SkPictureRecording) 1317 // canvas apis, without confusing subclasses (like SkPictureRecording)
1317 void internalDrawBitmap(const SkBitmap&, const SkMatrix& m, const SkPaint* p aint); 1318 void internalDrawBitmap(const SkBitmap&, const SkMatrix& m, const SkPaint* p aint);
1318 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, 1319 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
1319 const SkRect& dst, const SkPaint* paint, 1320 const SkRect& dst, const SkPaint* paint,
1320 DrawBitmapRectFlags flags); 1321 DrawBitmapRectFlags flags);
1321 void internalDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 1322 void internalDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
1322 const SkRect& dst, const SkPaint* paint); 1323 const SkRect& dst, const SkPaint* paint);
1323 void internalDrawPaint(const SkPaint& paint); 1324 void internalDrawPaint(const SkPaint& paint);
1324 void internalSaveLayer(const SkRect* bounds, const SkPaint*, SaveFlags, Save LayerStrategy); 1325 void internalSaveLayer(const SkRect* bounds, const SkPaint*, SaveFlags, Save LayerStrategy);
1325 void internalDrawDevice(SkBaseDevice*, int x, int y, const SkPaint*); 1326 void internalDrawDevice(SkBaseDevice*, int x, int y, const SkPaint*, const S kMatrix& extraMatrix);
1326 1327
1327 // shared by save() and saveLayer() 1328 // shared by save() and saveLayer()
1328 void internalSave(); 1329 void internalSave();
1329 void internalRestore(); 1330 void internalRestore();
1330 static void DrawRect(const SkDraw& draw, const SkPaint& paint, 1331 static void DrawRect(const SkDraw& draw, const SkPaint& paint,
1331 const SkRect& r, SkScalar textSize); 1332 const SkRect& r, SkScalar textSize);
1332 static void DrawTextDecorations(const SkDraw& draw, const SkPaint& paint, 1333 static void DrawTextDecorations(const SkDraw& draw, const SkPaint& paint,
1333 const char text[], size_t byteLength, 1334 const char text[], size_t byteLength,
1334 SkScalar x, SkScalar y); 1335 SkScalar x, SkScalar y);
1335 1336
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 1491
1491 class SkCanvasClipVisitor { 1492 class SkCanvasClipVisitor {
1492 public: 1493 public:
1493 virtual ~SkCanvasClipVisitor(); 1494 virtual ~SkCanvasClipVisitor();
1494 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1495 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1495 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1496 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1496 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1497 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1497 }; 1498 };
1498 1499
1499 #endif 1500 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698