| 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 "SkCanvasPriv.h" | 9 #include "SkCanvasPriv.h" |
| 10 #include "SkBitmapDevice.h" | 10 #include "SkBitmapDevice.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 | 266 |
| 267 const DeviceCM* rec = fCurrLayer; | 267 const DeviceCM* rec = fCurrLayer; |
| 268 if (rec && rec->fDevice) { | 268 if (rec && rec->fDevice) { |
| 269 | 269 |
| 270 fMatrix = rec->fMatrix; | 270 fMatrix = rec->fMatrix; |
| 271 fClip = &((SkRasterClip*)&rec->fClip)->forceGetBW(); | 271 fClip = &((SkRasterClip*)&rec->fClip)->forceGetBW(); |
| 272 fRC = &rec->fClip; | 272 fRC = &rec->fClip; |
| 273 fDevice = rec->fDevice; | 273 fDevice = rec->fDevice; |
| 274 if (!fDevice->accessPixels(&fDst)) { | 274 fBitmap = &fDevice->accessBitmap(true); |
| 275 fDst.reset(fDevice->imageInfo(), NULL, 0); | |
| 276 } | |
| 277 fPaint = rec->fPaint; | 275 fPaint = rec->fPaint; |
| 278 SkDEBUGCODE(this->validate();) | 276 SkDEBUGCODE(this->validate();) |
| 279 | 277 |
| 280 fCurrLayer = rec->fNext; | 278 fCurrLayer = rec->fNext; |
| 281 // fCurrLayer may be NULL now | 279 // fCurrLayer may be NULL now |
| 282 | 280 |
| 283 return true; | 281 return true; |
| 284 } | 282 } |
| 285 return false; | 283 return false; |
| 286 } | 284 } |
| (...skipping 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2713 } | 2711 } |
| 2714 | 2712 |
| 2715 if (matrix) { | 2713 if (matrix) { |
| 2716 canvas->concat(*matrix); | 2714 canvas->concat(*matrix); |
| 2717 } | 2715 } |
| 2718 } | 2716 } |
| 2719 | 2717 |
| 2720 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2718 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
| 2721 fCanvas->restoreToCount(fSaveCount); | 2719 fCanvas->restoreToCount(fSaveCount); |
| 2722 } | 2720 } |
| OLD | NEW |