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

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

Issue 1467253002: Restrict query bounds for reduce clip to dev bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years 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 | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrReducedClip.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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 GrBATCH_INFO("\t\tBreaking because of (%s, B%u) Rendertarget\n", 501 GrBATCH_INFO("\t\tBreaking because of (%s, B%u) Rendertarget\n",
502 candidate->name(), candidate->uniqueID()); 502 candidate->name(), candidate->uniqueID());
503 break; 503 break;
504 } 504 }
505 if (candidate->combineIfPossible(batch, *this->caps())) { 505 if (candidate->combineIfPossible(batch, *this->caps())) {
506 GrBATCH_INFO("\t\tCombining with (%s, B%u)\n", candidate->name() , 506 GrBATCH_INFO("\t\tCombining with (%s, B%u)\n", candidate->name() ,
507 candidate->uniqueID()); 507 candidate->uniqueID());
508 return; 508 return;
509 } 509 }
510 // Stop going backwards if we would cause a painter's order violatio n. 510 // Stop going backwards if we would cause a painter's order violatio n.
511 // TODO: The bounds used here do not fully consider the clip. It may be advantageous
512 // to clip each batch's bounds to the clip.
511 if (intersect(candidate->bounds(), batch->bounds())) { 513 if (intersect(candidate->bounds(), batch->bounds())) {
512 GrBATCH_INFO("\t\tIntersects with (%s, B%u)\n", candidate->name( ), 514 GrBATCH_INFO("\t\tIntersects with (%s, B%u)\n", candidate->name( ),
513 candidate->uniqueID()); 515 candidate->uniqueID());
514 break; 516 break;
515 } 517 }
516 ++i; 518 ++i;
517 if (i == maxCandidates) { 519 if (i == maxCandidates) {
518 GrBATCH_INFO("\t\tReached max lookback or beginning of batch arr ay %d\n", i); 520 GrBATCH_INFO("\t\tReached max lookback or beginning of batch arr ay %d\n", i);
519 break; 521 break;
520 } 522 }
(...skipping 26 matching lines...) Expand all
547 } 549 }
548 550
549 return true; 551 return true;
550 } 552 }
551 553
552 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 554 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
553 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 555 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
554 this->recordBatch(batch); 556 this->recordBatch(batch);
555 batch->unref(); 557 batch->unref();
556 } 558 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrReducedClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698