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

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

Issue 1140943004: Implement support for non-scale/translate CTM in image filters. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment 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 | 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 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 class MCRec; 1254 class MCRec;
1255 1255
1256 SkAutoTUnref<SkClipStack> fClipStack; 1256 SkAutoTUnref<SkClipStack> fClipStack;
1257 SkDeque fMCStack; 1257 SkDeque fMCStack;
1258 // points to top of stack 1258 // points to top of stack
1259 MCRec* fMCRec; 1259 MCRec* fMCRec;
1260 // the first N recs that can fit here mean we won't call malloc 1260 // the first N recs that can fit here mean we won't call malloc
1261 enum { 1261 enum {
1262 kMCRecSize = 128, // most recent measurement 1262 kMCRecSize = 128, // most recent measurement
1263 kMCRecCount = 8, // common depth for save/restores 1263 kMCRecCount = 8, // common depth for save/restores
1264 kDeviceCMSize = 136, // most recent measurement 1264 kDeviceCMSize = 176, // most recent measurement
1265 }; 1265 };
1266 intptr_t fMCRecStorage[kMCRecSize * kMCRecCount / sizeof(intptr_t)]; 1266 intptr_t fMCRecStorage[kMCRecSize * kMCRecCount / sizeof(intptr_t)];
1267 intptr_t fDeviceCMStorage[kDeviceCMSize / sizeof(intptr_t)]; 1267 intptr_t fDeviceCMStorage[kDeviceCMSize / sizeof(intptr_t)];
1268 1268
1269 const SkSurfaceProps fProps; 1269 const SkSurfaceProps fProps;
1270 1270
1271 int fSaveCount; // value returned by getSaveCount() 1271 int fSaveCount; // value returned by getSaveCount()
1272 1272
1273 SkMetaData* fMetaData; 1273 SkMetaData* fMetaData;
1274 1274
1275 SkSurface_Base* fSurfaceBase; 1275 SkSurface_Base* fSurfaceBase;
1276 SkSurface_Base* getSurfaceBase() const { return fSurfaceBase; } 1276 SkSurface_Base* getSurfaceBase() const { return fSurfaceBase; }
1277 void setSurfaceBase(SkSurface_Base* sb) { 1277 void setSurfaceBase(SkSurface_Base* sb) {
1278 fSurfaceBase = sb; 1278 fSurfaceBase = sb;
1279 } 1279 }
1280 friend class SkSurface_Base; 1280 friend class SkSurface_Base;
1281 friend class SkSurface_Gpu; 1281 friend class SkSurface_Gpu;
1282 1282
1283 bool fDeviceCMDirty; // cleared by updateDeviceCMCache() 1283 bool fDeviceCMDirty; // cleared by updateDeviceCMCache()
1284 void updateDeviceCMCache(); 1284 void updateDeviceCMCache();
1285 1285
1286 void doSave(); 1286 void doSave();
1287 void checkForDeferredSave(); 1287 void checkForDeferredSave();
1288 void internalSetMatrix(const SkMatrix& matrix);
1288 1289
1289 friend class SkDrawIter; // needs setupDrawForLayerDevice() 1290 friend class SkDrawIter; // needs setupDrawForLayerDevice()
1290 friend class AutoDrawLooper; 1291 friend class AutoDrawLooper;
1291 friend class SkLua; // needs top layer size and offset 1292 friend class SkLua; // needs top layer size and offset
1292 friend class SkDebugCanvas; // needs experimental fAllowSimplifyClip 1293 friend class SkDebugCanvas; // needs experimental fAllowSimplifyClip
1293 friend class SkDeferredDevice; // needs getTopDevice() 1294 friend class SkDeferredDevice; // needs getTopDevice()
1294 friend class SkSurface_Raster; // needs getDevice() 1295 friend class SkSurface_Raster; // needs getDevice()
1295 friend class SkRecorder; // InitFlags 1296 friend class SkRecorder; // InitFlags
1296 friend class SkNoSaveLayerCanvas; // InitFlags 1297 friend class SkNoSaveLayerCanvas; // InitFlags
1297 friend class SkPictureImageFilter; // SkCanvas(SkBaseDevice*, SkSurfaceProp s*, InitFlags) 1298 friend class SkPictureImageFilter; // SkCanvas(SkBaseDevice*, SkSurfaceProp s*, InitFlags)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 1501
1501 class SkCanvasClipVisitor { 1502 class SkCanvasClipVisitor {
1502 public: 1503 public:
1503 virtual ~SkCanvasClipVisitor(); 1504 virtual ~SkCanvasClipVisitor();
1504 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1505 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1505 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1506 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1506 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1507 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1507 }; 1508 };
1508 1509
1509 #endif 1510 #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