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 "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 , fConservativeRasterClip(false) | 678 , fConservativeRasterClip(false) |
679 { | 679 { |
680 inc_canvas(); | 680 inc_canvas(); |
681 | 681 |
682 this->init(nullptr, kDefault_InitFlags); | 682 this->init(nullptr, kDefault_InitFlags); |
683 } | 683 } |
684 | 684 |
685 static SkBitmap make_nopixels(int width, int height) { | 685 static SkBitmap make_nopixels(int width, int height) { |
686 SkBitmap bitmap; | 686 SkBitmap bitmap; |
687 bitmap.setInfo(SkImageInfo::MakeUnknown(width, height)); | 687 bitmap.setInfo(SkImageInfo::MakeUnknown(width, height)); |
688 return bitmap; | 688 return skstd::move(bitmap); |
689 } | 689 } |
690 | 690 |
691 class SkNoPixelsBitmapDevice : public SkBitmapDevice { | 691 class SkNoPixelsBitmapDevice : public SkBitmapDevice { |
692 public: | 692 public: |
693 SkNoPixelsBitmapDevice(const SkIRect& bounds, const SkSurfaceProps& surfaceP
rops) | 693 SkNoPixelsBitmapDevice(const SkIRect& bounds, const SkSurfaceProps& surfaceP
rops) |
694 : INHERITED(make_nopixels(bounds.width(), bounds.height()), surfaceProps
) | 694 : INHERITED(make_nopixels(bounds.width(), bounds.height()), surfaceProps
) |
695 { | 695 { |
696 this->setOrigin(bounds.x(), bounds.y()); | 696 this->setOrigin(bounds.x(), bounds.y()); |
697 } | 697 } |
698 | 698 |
(...skipping 2305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3004 } | 3004 } |
3005 | 3005 |
3006 if (matrix) { | 3006 if (matrix) { |
3007 canvas->concat(*matrix); | 3007 canvas->concat(*matrix); |
3008 } | 3008 } |
3009 } | 3009 } |
3010 | 3010 |
3011 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 3011 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
3012 fCanvas->restoreToCount(fSaveCount); | 3012 fCanvas->restoreToCount(fSaveCount); |
3013 } | 3013 } |
OLD | NEW |