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

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

Issue 1372973003: fix for default path renderer draws harlines without bloating (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix reordering Created 5 years, 2 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/batches/GrDefaultPathRenderer.cpp » ('j') | 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 #include "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 void GrDrawTarget::recordBatch(GrBatch* batch) { 389 void GrDrawTarget::recordBatch(GrBatch* batch) {
390 // Check if there is a Batch Draw we can batch with by linearly searching ba ck until we either 390 // Check if there is a Batch Draw we can batch with by linearly searching ba ck until we either
391 // 1) check every draw 391 // 1) check every draw
392 // 2) intersect with something 392 // 2) intersect with something
393 // 3) find a 'blocker' 393 // 3) find a 'blocker'
394 // Experimentally we have found that most batching occurs within the first 1 0 comparisons. 394 // Experimentally we have found that most batching occurs within the first 1 0 comparisons.
395 static const int kMaxLookback = 10; 395 static const int kMaxLookback = 10;
396 396
397 GrBATCH_INFO("Re-Recording (%s, B%u)\n" 397 GrBATCH_INFO("Re-Recording (%s, B%u)\n"
398 "\tBounds (%f, %f, %f, %f)\n", 398 "\tBounds LRTB (%f, %f, %f, %f)\n",
399 batch->name(), 399 batch->name(),
400 batch->uniqueID(), 400 batch->uniqueID(),
401 batch->bounds().fLeft, batch->bounds().fRight, 401 batch->bounds().fLeft, batch->bounds().fRight,
402 batch->bounds().fTop, batch->bounds().fBottom); 402 batch->bounds().fTop, batch->bounds().fBottom);
403 GrBATCH_INFO(SkTabString(batch->dumpInfo(), 1).c_str()); 403 GrBATCH_INFO(SkTabString(batch->dumpInfo(), 1).c_str());
404 GrBATCH_INFO("\tOutcome:\n"); 404 GrBATCH_INFO("\tOutcome:\n");
405 int maxCandidates = SkTMin(kMaxLookback, fBatches.count()); 405 int maxCandidates = SkTMin(kMaxLookback, fBatches.count());
406 if (maxCandidates) { 406 if (maxCandidates) {
407 int i = 0; 407 int i = 0;
408 while (true) { 408 while (true) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 return true; 460 return true;
461 } 461 }
462 462
463 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 463 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
464 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 464 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
465 this->recordBatch(batch); 465 this->recordBatch(batch);
466 batch->unref(); 466 batch->unref();
467 } 467 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698