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

Side by Side Diff: src/gpu/text/GrAtlasTextBlob.cpp

Issue 2035823002: Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments Created 4 years, 6 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
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698