Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: src/utils/SkDeferredCanvas.cpp

Issue 174593003: override new virtual onDrawDRRect in util canvas subclasses (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/utils/SkProxyCanvas.h ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « include/utils/SkProxyCanvas.h ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698