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

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

Issue 355603003: Initialize a variable in GrDrawTarget::drawPaths (Closed) Base URL: https://skia.googlesource.com/skia.git@rebaseline-implement-text-with-nvpr
Patch Set: Created 6 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
« no previous file with comments | « no previous file | 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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 SkPath::FillType fill, SkStrokeRec::Style stroke) { 553 SkPath::FillType fill, SkStrokeRec::Style stroke) {
554 SkASSERT(pathCount > 0); 554 SkASSERT(pathCount > 0);
555 SkASSERT(NULL != paths); 555 SkASSERT(NULL != paths);
556 SkASSERT(NULL != paths[0]); 556 SkASSERT(NULL != paths[0]);
557 SkASSERT(this->caps()->pathRenderingSupport()); 557 SkASSERT(this->caps()->pathRenderingSupport());
558 SkASSERT(!SkPath::IsInverseFillType(fill)); 558 SkASSERT(!SkPath::IsInverseFillType(fill));
559 559
560 const GrDrawState* drawState = &getDrawState(); 560 const GrDrawState* drawState = &getDrawState();
561 561
562 SkRect devBounds; 562 SkRect devBounds;
563 for (int i = 0; i < pathCount; ++i) { 563 transforms[0].mapRect(&devBounds, paths[0]->getBounds());
564 for (int i = 1; i < pathCount; ++i) {
564 SkRect mappedPathBounds; 565 SkRect mappedPathBounds;
565 transforms[i].mapRect(&mappedPathBounds, paths[i]->getBounds()); 566 transforms[i].mapRect(&mappedPathBounds, paths[i]->getBounds());
566 devBounds.join(mappedPathBounds); 567 devBounds.join(mappedPathBounds);
567 } 568 }
568 569
569 SkMatrix viewM = drawState->getViewMatrix(); 570 SkMatrix viewM = drawState->getViewMatrix();
570 viewM.mapRect(&devBounds); 571 viewM.mapRect(&devBounds);
571 572
572 GrDeviceCoordTexture dstCopy; 573 GrDeviceCoordTexture dstCopy;
573 if (!this->setupDstReadIfNecessary(&dstCopy, &devBounds)) { 574 if (!this->setupDstReadIfNecessary(&dstCopy, &devBounds)) {
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 1159 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
1159 1160
1160 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1161 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1161 r.appendf("%s is uploadable to a texture: %s\n", 1162 r.appendf("%s is uploadable to a texture: %s\n",
1162 kConfigNames[i], 1163 kConfigNames[i],
1163 gNY[fConfigTextureSupport[i]]); 1164 gNY[fConfigTextureSupport[i]]);
1164 } 1165 }
1165 1166
1166 return r; 1167 return r;
1167 } 1168 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698