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

Side by Side Diff: src/gpu/effects/GrPorterDuffXferProcessor.cpp

Issue 1135283002: Fix valgrind bug in Porter Duff LCD. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "effects/GrPorterDuffXferProcessor.h" 8 #include "effects/GrPorterDuffXferProcessor.h"
9 9
10 #include "GrBlend.h" 10 #include "GrBlend.h"
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 blendConstant |= (0xff << GrColor_SHIFT_A); 556 blendConstant |= (0xff << GrColor_SHIFT_A);
557 557
558 return SkNEW_ARGS(PDLCDXferProcessor, (blendConstant, alpha)); 558 return SkNEW_ARGS(PDLCDXferProcessor, (blendConstant, alpha));
559 } 559 }
560 560
561 PDLCDXferProcessor::~PDLCDXferProcessor() { 561 PDLCDXferProcessor::~PDLCDXferProcessor() {
562 } 562 }
563 563
564 void PDLCDXferProcessor::onGetGLProcessorKey(const GrGLSLCaps& caps, 564 void PDLCDXferProcessor::onGetGLProcessorKey(const GrGLSLCaps& caps,
565 GrProcessorKeyBuilder* b) const { 565 GrProcessorKeyBuilder* b) const {
566 GLPorterDuffXferProcessor::GenKey(*this, caps, b); 566 GLPDLCDXferProcessor::GenKey(*this, caps, b);
567 } 567 }
568 568
569 GrGLXferProcessor* PDLCDXferProcessor::createGLInstance() const { 569 GrGLXferProcessor* PDLCDXferProcessor::createGLInstance() const {
570 return SkNEW_ARGS(GLPDLCDXferProcessor, (*this)); 570 return SkNEW_ARGS(GLPDLCDXferProcessor, (*this));
571 } 571 }
572 572
573 GrXferProcessor::OptFlags 573 GrXferProcessor::OptFlags
574 PDLCDXferProcessor::onGetOptimizations(const GrProcOptInfo& colorPOI, 574 PDLCDXferProcessor::onGetOptimizations(const GrProcOptInfo& colorPOI,
575 const GrProcOptInfo& coveragePOI, 575 const GrProcOptInfo& coveragePOI,
576 bool doesStencilWrite, 576 bool doesStencilWrite,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory); 799 GR_DEFINE_XP_FACTORY_TEST(GrPorterDuffXPFactory);
800 800
801 GrXPFactory* GrPorterDuffXPFactory::TestCreate(SkRandom* random, 801 GrXPFactory* GrPorterDuffXPFactory::TestCreate(SkRandom* random,
802 GrContext*, 802 GrContext*,
803 const GrDrawTargetCaps&, 803 const GrDrawTargetCaps&,
804 GrTexture*[]) { 804 GrTexture*[]) {
805 SkXfermode::Mode mode = SkXfermode::Mode(random->nextULessThan(SkXfermode::k LastCoeffMode)); 805 SkXfermode::Mode mode = SkXfermode::Mode(random->nextULessThan(SkXfermode::k LastCoeffMode));
806 return GrPorterDuffXPFactory::Create(mode); 806 return GrPorterDuffXPFactory::Create(mode);
807 } 807 }
808 808
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