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

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

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years, 1 month 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/GrContext.cpp ('k') | src/gpu/GrPaint.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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 424
425 if (this->caps()->useDrawInsteadOfClear()) { 425 if (this->caps()->useDrawInsteadOfClear()) {
426 // This works around a driver bug with clear by drawing a rect instead. 426 // This works around a driver bug with clear by drawing a rect instead.
427 // The driver will ignore a clear if it is the only thing rendered to a 427 // The driver will ignore a clear if it is the only thing rendered to a
428 // target before the target is read. 428 // target before the target is read.
429 if (rect == &rtRect) { 429 if (rect == &rtRect) {
430 this->discard(renderTarget); 430 this->discard(renderTarget);
431 } 431 }
432 432
433 GrPipelineBuilder pipelineBuilder; 433 GrPipelineBuilder pipelineBuilder;
434 pipelineBuilder.setXPFactory(
435 GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref();
434 pipelineBuilder.setRenderTarget(renderTarget); 436 pipelineBuilder.setRenderTarget(renderTarget);
435 437
436 this->drawNonAARect(pipelineBuilder, color, SkMatrix::I(), *rect); 438 this->drawNonAARect(pipelineBuilder, color, SkMatrix::I(), *rect);
437 } else { 439 } else {
438 GrBatch* batch = new GrClearBatch(*rect, color, renderTarget); 440 GrBatch* batch = new GrClearBatch(*rect, color, renderTarget);
439 this->recordBatch(batch); 441 this->recordBatch(batch);
440 batch->unref(); 442 batch->unref();
441 } 443 }
442 } 444 }
443 445
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/GrContext.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698