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

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

Issue 247983003: Revert of make drawText calls non-virtual, to ease SkFont and TextBlob (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/record/SkRecorder.cpp ('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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 this->isFullFrame(&bitmapRect, paint) && 897 this->isFullFrame(&bitmapRect, paint) &&
898 isPaintOpaque(paint, &bitmap)) { 898 isPaintOpaque(paint, &bitmap)) {
899 this->getDeferredDevice()->skipPendingCommands(); 899 this->getDeferredDevice()->skipPendingCommands();
900 } 900 }
901 901
902 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint); 902 AutoImmediateDrawIfNeeded autoDraw(*this, &bitmap, paint);
903 this->drawingCanvas()->drawSprite(bitmap, left, top, paint); 903 this->drawingCanvas()->drawSprite(bitmap, left, top, paint);
904 this->recordedDrawCommand(); 904 this->recordedDrawCommand();
905 } 905 }
906 906
907 void SkDeferredCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, 907 void SkDeferredCanvas::drawText(const void* text, size_t byteLength,
908 const SkPaint& paint) { 908 SkScalar x, SkScalar y, const SkPaint& paint) {
909 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); 909 AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
910 this->drawingCanvas()->drawText(text, byteLength, x, y, paint); 910 this->drawingCanvas()->drawText(text, byteLength, x, y, paint);
911 this->recordedDrawCommand(); 911 this->recordedDrawCommand();
912 } 912 }
913 913
914 void SkDeferredCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], 914 void SkDeferredCanvas::drawPosText(const void* text, size_t byteLength,
915 const SkPaint& paint) { 915 const SkPoint pos[], const SkPaint& paint) {
916 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); 916 AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
917 this->drawingCanvas()->drawPosText(text, byteLength, pos, paint); 917 this->drawingCanvas()->drawPosText(text, byteLength, pos, paint);
918 this->recordedDrawCommand(); 918 this->recordedDrawCommand();
919 } 919 }
920 920
921 void SkDeferredCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], 921 void SkDeferredCanvas::drawPosTextH(const void* text, size_t byteLength,
922 SkScalar constY, const SkPaint& paint) { 922 const SkScalar xpos[], SkScalar constY,
923 const SkPaint& paint) {
923 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); 924 AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
924 this->drawingCanvas()->drawPosTextH(text, byteLength, xpos, constY, paint); 925 this->drawingCanvas()->drawPosTextH(text, byteLength, xpos, constY, paint);
925 this->recordedDrawCommand(); 926 this->recordedDrawCommand();
926 } 927 }
927 928
928 void SkDeferredCanvas::onDrawTextOnPath(const void* text, size_t byteLength, con st SkPath& path, 929 void SkDeferredCanvas::drawTextOnPath(const void* text, size_t byteLength,
929 const SkMatrix* matrix, const SkPaint& p aint) { 930 const SkPath& path,
931 const SkMatrix* matrix,
932 const SkPaint& paint) {
930 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); 933 AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
931 this->drawingCanvas()->drawTextOnPath(text, byteLength, path, matrix, paint) ; 934 this->drawingCanvas()->drawTextOnPath(text, byteLength, path, matrix, paint) ;
932 this->recordedDrawCommand(); 935 this->recordedDrawCommand();
933 } 936 }
934 937
935 void SkDeferredCanvas::drawPicture(SkPicture& picture) { 938 void SkDeferredCanvas::drawPicture(SkPicture& picture) {
936 this->drawingCanvas()->drawPicture(picture); 939 this->drawingCanvas()->drawPicture(picture);
937 this->recordedDrawCommand(); 940 this->recordedDrawCommand();
938 } 941 }
939 942
(...skipping 19 matching lines...) Expand all
959 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { 962 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) {
960 this->drawingCanvas()->setDrawFilter(filter); 963 this->drawingCanvas()->setDrawFilter(filter);
961 this->INHERITED::setDrawFilter(filter); 964 this->INHERITED::setDrawFilter(filter);
962 this->recordedDrawCommand(); 965 this->recordedDrawCommand();
963 return filter; 966 return filter;
964 } 967 }
965 968
966 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { 969 SkCanvas* SkDeferredCanvas::canvasForDrawIter() {
967 return this->drawingCanvas(); 970 return this->drawingCanvas();
968 } 971 }
OLDNEW
« no previous file with comments | « src/record/SkRecorder.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698