| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 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 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkCanvasDrawable.h" | 9 #include "SkCanvasDrawable.h" |
| 10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
| (...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1039 // reset this, since internalDrawDevice will have set it to true | 1039 // reset this, since internalDrawDevice will have set it to true |
| 1040 fDeviceCMDirty = true; | 1040 fDeviceCMDirty = true; |
| 1041 | 1041 |
| 1042 SkASSERT(fSaveLayerCount > 0); | 1042 SkASSERT(fSaveLayerCount > 0); |
| 1043 fSaveLayerCount -= 1; | 1043 fSaveLayerCount -= 1; |
| 1044 } | 1044 } |
| 1045 SkDELETE(layer); | 1045 SkDELETE(layer); |
| 1046 } | 1046 } |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 bool SkCanvas::isDrawingToLayer() const { | |
| 1050 return fSaveLayerCount > 0; | |
| 1051 } | |
| 1052 | |
| 1053 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p
rops) { | 1049 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p
rops) { |
| 1054 if (NULL == props) { | 1050 if (NULL == props) { |
| 1055 props = &fProps; | 1051 props = &fProps; |
| 1056 } | 1052 } |
| 1057 return this->onNewSurface(info, *props); | 1053 return this->onNewSurface(info, *props); |
| 1058 } | 1054 } |
| 1059 | 1055 |
| 1060 SkSurface* SkCanvas::onNewSurface(const SkImageInfo& info, const SkSurfaceProps&
props) { | 1056 SkSurface* SkCanvas::onNewSurface(const SkImageInfo& info, const SkSurfaceProps&
props) { |
| 1061 SkBaseDevice* dev = this->getDevice(); | 1057 SkBaseDevice* dev = this->getDevice(); |
| 1062 return dev ? dev->newSurface(info, props) : NULL; | 1058 return dev ? dev->newSurface(info, props) : NULL; |
| (...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2502 } | 2498 } |
| 2503 | 2499 |
| 2504 if (matrix) { | 2500 if (matrix) { |
| 2505 canvas->concat(*matrix); | 2501 canvas->concat(*matrix); |
| 2506 } | 2502 } |
| 2507 } | 2503 } |
| 2508 | 2504 |
| 2509 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2505 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
| 2510 fCanvas->restoreToCount(fSaveCount); | 2506 fCanvas->restoreToCount(fSaveCount); |
| 2511 } | 2507 } |
| OLD | NEW |