OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrAtlasTextBlob.h" | 8 #include "GrAtlasTextBlob.h" |
9 | 9 |
10 #include "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 int glyphCount = info.glyphCount(); | 313 int glyphCount = info.glyphCount(); |
314 if (0 == glyphCount) { | 314 if (0 == glyphCount) { |
315 continue; | 315 continue; |
316 } | 316 } |
317 | 317 |
318 SkAutoTUnref<GrDrawBatch> batch(this->createBatch(info, glyphCount, run, | 318 SkAutoTUnref<GrDrawBatch> batch(this->createBatch(info, glyphCount, run, |
319 subRun, viewMatrix, x,
y, color, | 319 subRun, viewMatrix, x,
y, color, |
320 skPaint, props, | 320 skPaint, props, |
321 distanceAdjustTable, d
c->isGammaCorrect(), | 321 distanceAdjustTable, d
c->isGammaCorrect(), |
322 cache)); | 322 cache)); |
323 dc->drawBatch(pipelineBuilder, clip, batch); | 323 dc->drawBatch(*pipelineBuilder, clip, batch); |
324 } | 324 } |
325 } | 325 } |
326 | 326 |
327 static void calculate_translation(bool applyVM, | 327 static void calculate_translation(bool applyVM, |
328 const SkMatrix& newViewMatrix, SkScalar newX,
SkScalar newY, | 328 const SkMatrix& newViewMatrix, SkScalar newX,
SkScalar newY, |
329 const SkMatrix& currentViewMatrix, SkScalar cu
rrentX, | 329 const SkMatrix& currentViewMatrix, SkScalar cu
rrentX, |
330 SkScalar currentY, SkScalar* transX, SkScalar*
transY) { | 330 SkScalar currentY, SkScalar* transX, SkScalar*
transY) { |
331 if (applyVM) { | 331 if (applyVM) { |
332 *transX = newViewMatrix.getTranslateX() + | 332 *transX = newViewMatrix.getTranslateX() + |
333 newViewMatrix.getScaleX() * (newX - currentX) + | 333 newViewMatrix.getScaleX() * (newX - currentX) + |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 | 562 |
563 void GrAtlasTextBlob::Run::SubRunInfo::computeTranslation(const SkMatrix& viewMa
trix, | 563 void GrAtlasTextBlob::Run::SubRunInfo::computeTranslation(const SkMatrix& viewMa
trix, |
564 SkScalar x, SkScalar y
, SkScalar* transX, | 564 SkScalar x, SkScalar y
, SkScalar* transX, |
565 SkScalar* transY) { | 565 SkScalar* transY) { |
566 calculate_translation(!this->drawAsDistanceFields(), viewMatrix, x, y, | 566 calculate_translation(!this->drawAsDistanceFields(), viewMatrix, x, y, |
567 fCurrentViewMatrix, fX, fY, transX, transY); | 567 fCurrentViewMatrix, fX, fY, transX, transY); |
568 fCurrentViewMatrix = viewMatrix; | 568 fCurrentViewMatrix = viewMatrix; |
569 fX = x; | 569 fX = x; |
570 fY = y; | 570 fY = y; |
571 } | 571 } |
OLD | NEW |