Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 391 int getSaveCount() const; | 391 int getSaveCount() const; |
| 392 | 392 |
| 393 /** Efficient way to pop any calls to save() that happened after the save | 393 /** Efficient way to pop any calls to save() that happened after the save |
| 394 count reached saveCount. It is an error for saveCount to be greater than | 394 count reached saveCount. It is an error for saveCount to be greater than |
| 395 getSaveCount(). To pop all the way back to the initial matrix/clip conte xt | 395 getSaveCount(). To pop all the way back to the initial matrix/clip conte xt |
| 396 pass saveCount == 1. | 396 pass saveCount == 1. |
| 397 @param saveCount The number of save() levels to restore from | 397 @param saveCount The number of save() levels to restore from |
| 398 */ | 398 */ |
| 399 void restoreToCount(int saveCount); | 399 void restoreToCount(int saveCount); |
| 400 | 400 |
| 401 /** Returns true if drawing is currently going to a layer (from saveLayer) | |
| 402 * rather than to the root device. | |
| 403 */ | |
| 404 virtual bool isDrawingToLayer() const; | |
| 405 | |
| 406 /** Preconcat the current matrix with the specified translation | 401 /** Preconcat the current matrix with the specified translation |
| 407 @param dx The distance to translate in X | 402 @param dx The distance to translate in X |
| 408 @param dy The distance to translate in Y | 403 @param dy The distance to translate in Y |
| 409 */ | 404 */ |
| 410 void translate(SkScalar dx, SkScalar dy); | 405 void translate(SkScalar dx, SkScalar dy); |
| 411 | 406 |
| 412 /** Preconcat the current matrix with the specified scale. | 407 /** Preconcat the current matrix with the specified scale. |
| 413 @param sx The amount to scale in X | 408 @param sx The amount to scale in X |
| 414 @param sy The amount to scale in Y | 409 @param sy The amount to scale in Y |
| 415 */ | 410 */ |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1243 SkClipStack fClipStack; | 1238 SkClipStack fClipStack; |
| 1244 SkDeque fMCStack; | 1239 SkDeque fMCStack; |
| 1245 // points to top of stack | 1240 // points to top of stack |
| 1246 MCRec* fMCRec; | 1241 MCRec* fMCRec; |
| 1247 // the first N recs that can fit here mean we won't call malloc | 1242 // the first N recs that can fit here mean we won't call malloc |
| 1248 uint32_t fMCRecStorage[32]; | 1243 uint32_t fMCRecStorage[32]; |
| 1249 | 1244 |
| 1250 const SkSurfaceProps fProps; | 1245 const SkSurfaceProps fProps; |
| 1251 | 1246 |
| 1252 int fSaveCount; // value returned by getSaveCount() | 1247 int fSaveCount; // value returned by getSaveCount() |
| 1253 int fSaveLayerCount; // number of successful saveLayer calls | 1248 int fSaveLayerCount; // number of successful saveLayer calls |
|
reed1
2014/12/15 18:05:29
I think you can remove fSaveLayerCount...
| |
| 1254 | 1249 |
| 1255 SkMetaData* fMetaData; | 1250 SkMetaData* fMetaData; |
| 1256 | 1251 |
| 1257 SkSurface_Base* fSurfaceBase; | 1252 SkSurface_Base* fSurfaceBase; |
| 1258 SkSurface_Base* getSurfaceBase() const { return fSurfaceBase; } | 1253 SkSurface_Base* getSurfaceBase() const { return fSurfaceBase; } |
| 1259 void setSurfaceBase(SkSurface_Base* sb) { | 1254 void setSurfaceBase(SkSurface_Base* sb) { |
| 1260 fSurfaceBase = sb; | 1255 fSurfaceBase = sb; |
| 1261 } | 1256 } |
| 1262 friend class SkSurface_Base; | 1257 friend class SkSurface_Base; |
| 1263 friend class SkSurface_Gpu; | 1258 friend class SkSurface_Gpu; |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1491 | 1486 |
| 1492 class SkCanvasClipVisitor { | 1487 class SkCanvasClipVisitor { |
| 1493 public: | 1488 public: |
| 1494 virtual ~SkCanvasClipVisitor(); | 1489 virtual ~SkCanvasClipVisitor(); |
| 1495 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1490 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1496 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1491 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1497 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1492 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1498 }; | 1493 }; |
| 1499 | 1494 |
| 1500 #endif | 1495 #endif |
| OLD | NEW |