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

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

Issue 1473443004: Fix for recent SrcOver XP Change (Closed) Base URL: https://skia.googlesource.com/skia.git@noSrcOver
Patch Set: 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 | « 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 2015 Google Inc. 2 * Copyright 2015 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 "GrTextureParamsAdjuster.h" 8 #include "GrTextureParamsAdjuster.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // better! 90 // better!
91 SkASSERT(copyParams.fFilter != GrTextureParams::kMipMap_FilterMode); 91 SkASSERT(copyParams.fFilter != GrTextureParams::kMipMap_FilterMode);
92 paint.addColorFragmentProcessor( 92 paint.addColorFragmentProcessor(
93 GrTextureDomainEffect::Create(inputTexture, SkMatrix::I(), domain, 93 GrTextureDomainEffect::Create(inputTexture, SkMatrix::I(), domain,
94 GrTextureDomain::kClamp_Mode, 94 GrTextureDomain::kClamp_Mode,
95 copyParams.fFilter))->unref(); 95 copyParams.fFilter))->unref();
96 } else { 96 } else {
97 GrTextureParams params(SkShader::kClamp_TileMode, copyParams.fFilter); 97 GrTextureParams params(SkShader::kClamp_TileMode, copyParams.fFilter);
98 paint.addColorTextureProcessor(inputTexture, SkMatrix::I(), params); 98 paint.addColorTextureProcessor(inputTexture, SkMatrix::I(), params);
99 } 99 }
100 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
100 101
101 SkRect localRect; 102 SkRect localRect;
102 if (subset) { 103 if (subset) {
103 localRect = SkRect::Make(*subset); 104 localRect = SkRect::Make(*subset);
104 localRect.fLeft *= sx; 105 localRect.fLeft *= sx;
105 localRect.fTop *= sy; 106 localRect.fTop *= sy;
106 localRect.fRight *= sx; 107 localRect.fRight *= sx;
107 localRect.fBottom *= sy; 108 localRect.fBottom *= sy;
108 } else { 109 } else {
109 localRect = SkRect::MakeWH(1.f, 1.f); 110 localRect = SkRect::MakeWH(1.f, 1.f);
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 filterOrNullForBicubic); 474 filterOrNullForBicubic);
474 } 475 }
475 476
476 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams ) { 477 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams ) {
477 SkAutoTUnref<GrTexture> original(this->refOriginalTexture()); 478 SkAutoTUnref<GrTexture> original(this->refOriginalTexture());
478 if (!original) { 479 if (!original) {
479 return nullptr; 480 return nullptr;
480 } 481 }
481 return copy_on_gpu(original, nullptr, copyParams); 482 return copy_on_gpu(original, nullptr, copyParams);
482 } 483 }
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