OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkPixelXorXfermode.h" | 8 #include "SkPixelXorXfermode.h" |
9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
10 #include "SkReadBuffer.h" | 10 #include "SkReadBuffer.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 } | 338 } |
339 | 339 |
340 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, | 340 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, |
341 const GrPipelineOptimizations& optimi
zations, | 341 const GrPipelineOptimizations& optimi
zations, |
342 bool hasMixedSamples, | 342 bool hasMixedSamples, |
343 const DstTexture* dstTexture) const o
verride { | 343 const DstTexture* dstTexture) const o
verride { |
344 return new PixelXorXP(dstTexture, hasMixedSamples, fOpColor); | 344 return new PixelXorXP(dstTexture, hasMixedSamples, fOpColor); |
345 } | 345 } |
346 | 346 |
347 bool onWillReadDstColor(const GrCaps& caps, | 347 bool onWillReadDstColor(const GrCaps& caps, |
348 const GrPipelineOptimizations& optimizations, | 348 const GrPipelineOptimizations& optimizations, |
349 bool hasMixedSamples) const override { | 349 bool hasMixedSamples) const override { |
350 return true; | 350 return true; |
351 } | 351 } |
352 | 352 |
353 bool onIsEqual(const GrXPFactory& xpfBase) const override { | 353 bool onIsEqual(const GrXPFactory& xpfBase) const override { |
354 const GrPixelXorXPFactory& xpf = xpfBase.cast<GrPixelXorXPFactory>(); | 354 const GrPixelXorXPFactory& xpf = xpfBase.cast<GrPixelXorXPFactory>(); |
355 return fOpColor == xpf.fOpColor; | 355 return fOpColor == xpf.fOpColor; |
356 } | 356 } |
357 | 357 |
358 GR_DECLARE_XP_FACTORY_TEST; | 358 GR_DECLARE_XP_FACTORY_TEST; |
359 | 359 |
(...skipping 21 matching lines...) Expand all Loading... |
381 } | 381 } |
382 | 382 |
383 bool SkPixelXorXfermode::asXPFactory(GrXPFactory** xpf) const { | 383 bool SkPixelXorXfermode::asXPFactory(GrXPFactory** xpf) const { |
384 if (xpf) { | 384 if (xpf) { |
385 *xpf = GrPixelXorXPFactory::Create(fOpColor); | 385 *xpf = GrPixelXorXPFactory::Create(fOpColor); |
386 } | 386 } |
387 return true; | 387 return true; |
388 } | 388 } |
389 | 389 |
390 #endif | 390 #endif |
OLD | NEW |