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

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

Issue 605533002: Fix SkTextBlob offset semantics. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: default run positioning fix Created 6 years, 3 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 | « src/utils/SkGatherPixelRefsAndRects.h ('k') | no next file » | 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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
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 "SkData.h" 10 #include "SkData.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, 125 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap,
126 int x, int y, const SkPaint& paint) SK_OVERRIDE { 126 int x, int y, const SkPaint& paint) SK_OVERRIDE {
127 this->addBitmap(bitmap); 127 this->addBitmap(bitmap);
128 } 128 }
129 virtual void drawText(const SkDraw&, const void* text, size_t len, 129 virtual void drawText(const SkDraw&, const void* text, size_t len,
130 SkScalar x, SkScalar y, 130 SkScalar x, SkScalar y,
131 const SkPaint& paint) SK_OVERRIDE { 131 const SkPaint& paint) SK_OVERRIDE {
132 this->addBitmapFromPaint(paint); 132 this->addBitmapFromPaint(paint);
133 } 133 }
134 virtual void drawPosText(const SkDraw&, const void* text, size_t len, 134 virtual void drawPosText(const SkDraw&, const void* text, size_t len,
135 const SkScalar pos[], SkScalar constY, 135 const SkScalar pos[], int,
136 int, const SkPaint& paint) SK_OVERRIDE { 136 const SkPoint&, const SkPaint& paint) SK_OVERRIDE {
137 this->addBitmapFromPaint(paint); 137 this->addBitmapFromPaint(paint);
138 } 138 }
139 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, 139 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len,
140 const SkPath& path, const SkMatrix* matrix, 140 const SkPath& path, const SkMatrix* matrix,
141 const SkPaint& paint) SK_OVERRIDE { 141 const SkPaint& paint) SK_OVERRIDE {
142 this->addBitmapFromPaint(paint); 142 this->addBitmapFromPaint(paint);
143 } 143 }
144 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou nt, 144 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou nt,
145 const SkPoint verts[], const SkPoint texs[], 145 const SkPoint verts[], const SkPoint texs[],
146 const SkColor colors[], SkXfermode* xmode, 146 const SkColor colors[], SkXfermode* xmode,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 canvas.clipRect(area, SkRegion::kIntersect_Op, false); 211 canvas.clipRect(area, SkRegion::kIntersect_Op, false);
212 canvas.drawPicture(pict); 212 canvas.drawPicture(pict);
213 213
214 SkData* data = NULL; 214 SkData* data = NULL;
215 int count = array.count(); 215 int count = array.count();
216 if (count > 0) { 216 if (count > 0) {
217 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*) ); 217 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*) );
218 } 218 }
219 return data; 219 return data;
220 } 220 }
OLDNEW
« no previous file with comments | « src/utils/SkGatherPixelRefsAndRects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698