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

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

Issue 2041283002: Replace targetHasUnifiedMultisampling in GrPB constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@fixdash
Patch Set: rebase 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 const GrDistanceFieldAdjustTable* distanceAdju stTable, 412 const GrDistanceFieldAdjustTable* distanceAdju stTable,
413 const SkPaint& skPaint, 413 const SkPaint& skPaint,
414 const GrPaint& grPaint, 414 const GrPaint& grPaint,
415 SkDrawFilter* drawFilter, 415 SkDrawFilter* drawFilter,
416 const GrClip& clip, 416 const GrClip& clip,
417 const SkMatrix& viewMatrix, 417 const SkMatrix& viewMatrix,
418 const SkIRect& clipBounds, 418 const SkIRect& clipBounds,
419 SkScalar x, SkScalar y) { 419 SkScalar x, SkScalar y) {
420 // We loop through the runs of the blob, flushing each. If any run is too l arge, then we flush 420 // We loop through the runs of the blob, flushing each. If any run is too l arge, then we flush
421 // it as paths 421 // it as paths
422 GrPipelineBuilder pipelineBuilder(grPaint, dc->isUnifiedMultisampled()); 422 GrPipelineBuilder pipelineBuilder(grPaint, dc->mustUseHWAA(grPaint));
423 423
424 GrColor color = grPaint.getColor(); 424 GrColor color = grPaint.getColor();
425 425
426 SkTextBlobRunIterator it(blob); 426 SkTextBlobRunIterator it(blob);
427 for (int run = 0; !it.done(); it.next(), run++) { 427 for (int run = 0; !it.done(); it.next(), run++) {
428 if (fRuns[run].fDrawAsPaths) { 428 if (fRuns[run].fDrawAsPaths) {
429 this->flushRunAsPaths(context, dc, props, it, clip, skPaint, 429 this->flushRunAsPaths(context, dc, props, it, clip, skPaint,
430 drawFilter, viewMatrix, clipBounds, x, y); 430 drawFilter, viewMatrix, clipBounds, x, y);
431 continue; 431 continue;
432 } 432 }
433 this->flushRun(dc, &pipelineBuilder, clip, run, viewMatrix, x, y, color, skPaint, props, 433 this->flushRun(dc, &pipelineBuilder, clip, run, viewMatrix, x, y, color, skPaint, props,
434 distanceAdjustTable, context->getBatchFontCache()); 434 distanceAdjustTable, context->getBatchFontCache());
435 } 435 }
436 436
437 // Now flush big glyphs 437 // Now flush big glyphs
438 this->flushBigGlyphs(context, dc, clip, skPaint, viewMatrix, x, y, clipBound s); 438 this->flushBigGlyphs(context, dc, clip, skPaint, viewMatrix, x, y, clipBound s);
439 } 439 }
440 440
441 void GrAtlasTextBlob::flushThrowaway(GrContext* context, 441 void GrAtlasTextBlob::flushThrowaway(GrContext* context,
442 GrDrawContext* dc, 442 GrDrawContext* dc,
443 const SkSurfaceProps& props, 443 const SkSurfaceProps& props,
444 const GrDistanceFieldAdjustTable* distanceA djustTable, 444 const GrDistanceFieldAdjustTable* distanceA djustTable,
445 const SkPaint& skPaint, 445 const SkPaint& skPaint,
446 const GrPaint& grPaint, 446 const GrPaint& grPaint,
447 const GrClip& clip, 447 const GrClip& clip,
448 const SkMatrix& viewMatrix, 448 const SkMatrix& viewMatrix,
449 const SkIRect& clipBounds, 449 const SkIRect& clipBounds,
450 SkScalar x, SkScalar y) { 450 SkScalar x, SkScalar y) {
451 GrPipelineBuilder pipelineBuilder(grPaint, dc->isUnifiedMultisampled()); 451 GrPipelineBuilder pipelineBuilder(grPaint, dc->mustUseHWAA(grPaint));
452 452
453 GrColor color = grPaint.getColor(); 453 GrColor color = grPaint.getColor();
454 for (int run = 0; run < fRunCount; run++) { 454 for (int run = 0; run < fRunCount; run++) {
455 this->flushRun(dc, &pipelineBuilder, clip, run, viewMatrix, x, y, color, skPaint, props, 455 this->flushRun(dc, &pipelineBuilder, clip, run, viewMatrix, x, y, color, skPaint, props,
456 distanceAdjustTable, context->getBatchFontCache()); 456 distanceAdjustTable, context->getBatchFontCache());
457 } 457 }
458 458
459 // Now flush big glyphs 459 // Now flush big glyphs
460 this->flushBigGlyphs(context, dc, clip, skPaint, viewMatrix, x, y, clipBound s); 460 this->flushBigGlyphs(context, dc, clip, skPaint, viewMatrix, x, y, clipBound s);
461 } 461 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 560
561 void GrAtlasTextBlob::Run::SubRunInfo::computeTranslation(const SkMatrix& viewMa trix, 561 void GrAtlasTextBlob::Run::SubRunInfo::computeTranslation(const SkMatrix& viewMa trix,
562 SkScalar x, SkScalar y , SkScalar* transX, 562 SkScalar x, SkScalar y , SkScalar* transX,
563 SkScalar* transY) { 563 SkScalar* transY) {
564 calculate_translation(!this->drawAsDistanceFields(), viewMatrix, x, y, 564 calculate_translation(!this->drawAsDistanceFields(), viewMatrix, x, y,
565 fCurrentViewMatrix, fX, fY, transX, transY); 565 fCurrentViewMatrix, fX, fY, transX, transY);
566 fCurrentViewMatrix = viewMatrix; 566 fCurrentViewMatrix = viewMatrix;
567 fX = x; 567 fX = x;
568 fY = y; 568 fY = y;
569 } 569 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrTessellatingPathRenderer.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698