OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkDeferredCanvas.h" | 9 #include "SkDeferredCanvas.h" |
10 | 10 |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 this->SkDeferredCanvas::drawRect(rrect.getBounds(), paint); | 873 this->SkDeferredCanvas::drawRect(rrect.getBounds(), paint); |
874 } else if (rrect.isOval()) { | 874 } else if (rrect.isOval()) { |
875 this->SkDeferredCanvas::drawOval(rrect.getBounds(), paint); | 875 this->SkDeferredCanvas::drawOval(rrect.getBounds(), paint); |
876 } else { | 876 } else { |
877 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); | 877 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); |
878 this->drawingCanvas()->drawRRect(rrect, paint); | 878 this->drawingCanvas()->drawRRect(rrect, paint); |
879 this->recordedDrawCommand(); | 879 this->recordedDrawCommand(); |
880 } | 880 } |
881 } | 881 } |
882 | 882 |
| 883 void SkDeferredCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, |
| 884 const SkPaint& paint) { |
| 885 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); |
| 886 this->drawingCanvas()->drawDRRect(outer, inner, paint); |
| 887 this->recordedDrawCommand(); |
| 888 } |
| 889 |
883 void SkDeferredCanvas::drawPath(const SkPath& path, const SkPaint& paint) { | 890 void SkDeferredCanvas::drawPath(const SkPath& path, const SkPaint& paint) { |
884 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); | 891 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); |
885 this->drawingCanvas()->drawPath(path, paint); | 892 this->drawingCanvas()->drawPath(path, paint); |
886 this->recordedDrawCommand(); | 893 this->recordedDrawCommand(); |
887 } | 894 } |
888 | 895 |
889 void SkDeferredCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar left, | 896 void SkDeferredCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar left, |
890 SkScalar top, const SkPaint* paint) { | 897 SkScalar top, const SkPaint* paint) { |
891 SkRect bitmapRect = SkRect::MakeXYWH(left, top, | 898 SkRect bitmapRect = SkRect::MakeXYWH(left, top, |
892 SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height())); | 899 SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height())); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { | 1021 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { |
1015 this->drawingCanvas()->setDrawFilter(filter); | 1022 this->drawingCanvas()->setDrawFilter(filter); |
1016 this->INHERITED::setDrawFilter(filter); | 1023 this->INHERITED::setDrawFilter(filter); |
1017 this->recordedDrawCommand(); | 1024 this->recordedDrawCommand(); |
1018 return filter; | 1025 return filter; |
1019 } | 1026 } |
1020 | 1027 |
1021 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { | 1028 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { |
1022 return this->drawingCanvas(); | 1029 return this->drawingCanvas(); |
1023 } | 1030 } |
OLD | NEW |