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 | 8 |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
(...skipping 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2448 if (NULL != device) { | 2448 if (NULL != device) { |
2449 // Canvas has to first give the device the opportunity to render | 2449 // Canvas has to first give the device the opportunity to render |
2450 // the picture itself. | 2450 // the picture itself. |
2451 if (device->EXPERIMENTAL_drawPicture(this, picture, matrix, paint)) { | 2451 if (device->EXPERIMENTAL_drawPicture(this, picture, matrix, paint)) { |
2452 return; // the device has rendered the entire picture | 2452 return; // the device has rendered the entire picture |
2453 } | 2453 } |
2454 } | 2454 } |
2455 | 2455 |
2456 SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect()); | 2456 SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect()); |
2457 | 2457 |
2458 picture->draw(this); | 2458 picture->playback(this); |
2459 } | 2459 } |
2460 | 2460 |
2461 /////////////////////////////////////////////////////////////////////////////// | 2461 /////////////////////////////////////////////////////////////////////////////// |
2462 /////////////////////////////////////////////////////////////////////////////// | 2462 /////////////////////////////////////////////////////////////////////////////// |
2463 | 2463 |
2464 SkCanvas::LayerIter::LayerIter(SkCanvas* canvas, bool skipEmptyClips) { | 2464 SkCanvas::LayerIter::LayerIter(SkCanvas* canvas, bool skipEmptyClips) { |
2465 SK_COMPILE_ASSERT(sizeof(fStorage) >= sizeof(SkDrawIter), fStorage_too_small
); | 2465 SK_COMPILE_ASSERT(sizeof(fStorage) >= sizeof(SkDrawIter), fStorage_too_small
); |
2466 | 2466 |
2467 SkASSERT(canvas); | 2467 SkASSERT(canvas); |
2468 | 2468 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2572 } | 2572 } |
2573 | 2573 |
2574 if (NULL != matrix) { | 2574 if (NULL != matrix) { |
2575 canvas->concat(*matrix); | 2575 canvas->concat(*matrix); |
2576 } | 2576 } |
2577 } | 2577 } |
2578 | 2578 |
2579 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2579 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2580 fCanvas->restoreToCount(fSaveCount); | 2580 fCanvas->restoreToCount(fSaveCount); |
2581 } | 2581 } |
OLD | NEW |