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

Side by Side Diff: src/gpu/GrSWMaskHelper.cpp

Issue 1739063002: Fix oval rendering in vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@uboFormat
Patch Set: Created 4 years, 10 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 | « no previous file | src/gpu/vk/GrVkCaps.cpp » ('j') | src/gpu/vk/GrVkCaps.cpp » ('J')
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 "GrSWMaskHelper.h" 8 #include "GrSWMaskHelper.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 /** 121 /**
122 * Draw a single path element of the clip stack into the accumulation bitmap 122 * Draw a single path element of the clip stack into the accumulation bitmap
123 */ 123 */
124 void GrSWMaskHelper::draw(const SkPath& path, const SkStrokeRec& stroke, SkRegio n::Op op, 124 void GrSWMaskHelper::draw(const SkPath& path, const SkStrokeRec& stroke, SkRegio n::Op op,
125 bool antiAlias, uint8_t alpha) { 125 bool antiAlias, uint8_t alpha) {
126 126
127 SkPaint paint; 127 SkPaint paint;
128 if (stroke.isHairlineStyle()) { 128 if (stroke.isHairlineStyle()) {
129 paint.setStyle(SkPaint::kStroke_Style); 129 paint.setStyle(SkPaint::kStroke_Style);
130 paint.setStrokeWidth(SK_Scalar1);
131 } else { 130 } else {
132 if (stroke.isFillStyle()) { 131 if (stroke.isFillStyle()) {
133 paint.setStyle(SkPaint::kFill_Style); 132 paint.setStyle(SkPaint::kFill_Style);
134 } else { 133 } else {
135 paint.setStyle(SkPaint::kStroke_Style); 134 paint.setStyle(SkPaint::kStroke_Style);
136 paint.setStrokeJoin(stroke.getJoin()); 135 paint.setStrokeJoin(stroke.getJoin());
137 paint.setStrokeCap(stroke.getCap()); 136 paint.setStrokeCap(stroke.getCap());
138 paint.setStrokeWidth(stroke.getWidth()); 137 paint.setStrokeWidth(stroke.getWidth());
139 } 138 }
140 } 139 }
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 pipelineBuilder->addCoverageFragmentProcessor( 361 pipelineBuilder->addCoverageFragmentProcessor(
363 GrSimpleTextureEffect::Create(texture, 362 GrSimpleTextureEffect::Create(texture,
364 maskMatrix, 363 maskMatrix,
365 GrTextureParams::kNone_Fi lterMode, 364 GrTextureParams::kNone_Fi lterMode,
366 kDevice_GrCoordSet))->unr ef(); 365 kDevice_GrCoordSet))->unr ef();
367 366
368 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, S kMatrix::I(), 367 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, S kMatrix::I(),
369 dstRect, nullptr, &invert)); 368 dstRect, nullptr, &invert));
370 target->drawBatch(*pipelineBuilder, batch); 369 target->drawBatch(*pipelineBuilder, batch);
371 } 370 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkCaps.cpp » ('j') | src/gpu/vk/GrVkCaps.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698