d23a395d51
Reason for revert: This is asserting on GTX660 bots with '!dst'. This may just be catching an existing issue. https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/622/steps/dm/logs/stdio https://build.chromium.org/p/client.skia/builders/Test-Win7-MSVC-ShuttleA-GPU-HD2000-x86-Debug-ANGLE/builds/209/steps/dm/logs/stdio https://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/318/steps/dm/logs/stdio Original issue's description: > Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names. > > Committed: https://skia.googlesource.com/skia/+/bb106b5f6ee18f7453b63f3a95f421b60a957f39 TBR=egdaniel@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1158453004
53 lines
1.7 KiB
C++
53 lines
1.7 KiB
C++
/*
|
|
* Copyright 2014 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef GrPorterDuffXferProcessor_DEFINED
|
|
#define GrPorterDuffXferProcessor_DEFINED
|
|
|
|
#include "GrTypes.h"
|
|
#include "GrXferProcessor.h"
|
|
#include "SkXfermode.h"
|
|
|
|
class GrProcOptInfo;
|
|
|
|
class GrPorterDuffXPFactory : public GrXPFactory {
|
|
public:
|
|
static GrXPFactory* Create(SkXfermode::Mode mode);
|
|
|
|
bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const override;
|
|
|
|
void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
|
|
GrXPFactory::InvariantOutput*) const override;
|
|
|
|
private:
|
|
GrPorterDuffXPFactory(SkXfermode::Mode);
|
|
|
|
GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
|
|
const GrProcOptInfo& colorPOI,
|
|
const GrProcOptInfo& coveragePOI,
|
|
const GrDeviceCoordTexture* dstCopy) const override;
|
|
|
|
bool willReadDstColor(const GrCaps& caps,
|
|
const GrProcOptInfo& colorPOI,
|
|
const GrProcOptInfo& coveragePOI) const override;
|
|
|
|
bool onIsEqual(const GrXPFactory& xpfBase) const override {
|
|
const GrPorterDuffXPFactory& xpf = xpfBase.cast<GrPorterDuffXPFactory>();
|
|
return fXfermode == xpf.fXfermode;
|
|
}
|
|
|
|
GR_DECLARE_XP_FACTORY_TEST;
|
|
static void TestGetXPOutputTypes(const GrXferProcessor*, int* outPrimary, int* outSecondary);
|
|
|
|
SkXfermode::Mode fXfermode;
|
|
|
|
friend class GrPorterDuffTest; // for TestGetXPOutputTypes()
|
|
typedef GrXPFactory INHERITED;
|
|
};
|
|
|
|
#endif
|