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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) | 600 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) |
601 , fProps(SkSurfacePropsCopyOrDefault(props)) | 601 , fProps(SkSurfacePropsCopyOrDefault(props)) |
602 { | 602 { |
603 inc_canvas(); | 603 inc_canvas(); |
604 | 604 |
605 this->init(device, flags); | 605 this->init(device, flags); |
606 } | 606 } |
607 | 607 |
608 SkCanvas::SkCanvas(SkBaseDevice* device) | 608 SkCanvas::SkCanvas(SkBaseDevice* device) |
609 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) | 609 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) |
610 , fProps(device->getLeakyProperties()) | 610 , fProps(device->surfaceProps()) |
611 { | 611 { |
612 inc_canvas(); | 612 inc_canvas(); |
613 | 613 |
614 this->init(device, kDefault_InitFlags); | 614 this->init(device, kDefault_InitFlags); |
615 } | 615 } |
616 | 616 |
617 SkCanvas::SkCanvas(SkBaseDevice* device, InitFlags flags) | 617 SkCanvas::SkCanvas(SkBaseDevice* device, InitFlags flags) |
618 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) | 618 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) |
619 , fProps(device->getLeakyProperties()) | 619 , fProps(device->surfaceProps()) |
620 { | 620 { |
621 inc_canvas(); | 621 inc_canvas(); |
622 | 622 |
623 this->init(device, flags); | 623 this->init(device, flags); |
624 } | 624 } |
625 | 625 |
626 SkCanvas::SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props) | 626 SkCanvas::SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props) |
627 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) | 627 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) |
628 , fProps(props) | 628 , fProps(props) |
629 { | 629 { |
(...skipping 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2722 } | 2722 } |
2723 | 2723 |
2724 if (matrix) { | 2724 if (matrix) { |
2725 canvas->concat(*matrix); | 2725 canvas->concat(*matrix); |
2726 } | 2726 } |
2727 } | 2727 } |
2728 | 2728 |
2729 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2729 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2730 fCanvas->restoreToCount(fSaveCount); | 2730 fCanvas->restoreToCount(fSaveCount); |
2731 } | 2731 } |
OLD | NEW |