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

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

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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 | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/GrTextureToYUVPlanes.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 * 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // better! 65 // better!
66 SkASSERT(copyParams.fFilter != GrTextureParams::kMipMap_FilterMode); 66 SkASSERT(copyParams.fFilter != GrTextureParams::kMipMap_FilterMode);
67 paint.addColorFragmentProcessor( 67 paint.addColorFragmentProcessor(
68 GrTextureDomainEffect::Make(inputTexture, nullptr, SkMatrix::I(), do main, 68 GrTextureDomainEffect::Make(inputTexture, nullptr, SkMatrix::I(), do main,
69 GrTextureDomain::kClamp_Mode, 69 GrTextureDomain::kClamp_Mode,
70 copyParams.fFilter)); 70 copyParams.fFilter));
71 } else { 71 } else {
72 GrTextureParams params(SkShader::kClamp_TileMode, copyParams.fFilter); 72 GrTextureParams params(SkShader::kClamp_TileMode, copyParams.fFilter);
73 paint.addColorTextureProcessor(inputTexture, nullptr, SkMatrix::I(), par ams); 73 paint.addColorTextureProcessor(inputTexture, nullptr, SkMatrix::I(), par ams);
74 } 74 }
75 paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); 75 paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
76 76
77 SkRect localRect; 77 SkRect localRect;
78 if (subset) { 78 if (subset) {
79 localRect = SkRect::Make(*subset); 79 localRect = SkRect::Make(*subset);
80 localRect.fLeft *= sx; 80 localRect.fLeft *= sx;
81 localRect.fTop *= sy; 81 localRect.fTop *= sy;
82 localRect.fRight *= sx; 82 localRect.fRight *= sx;
83 localRect.fBottom *= sy; 83 localRect.fBottom *= sy;
84 } else { 84 } else {
85 localRect = SkRect::MakeWH(1.f, 1.f); 85 localRect = SkRect::MakeWH(1.f, 1.f);
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 513 }
514 514
515 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams , bool willBeMipped, 515 GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams , bool willBeMipped,
516 SkSourceGammaTreatment gamma Treatment) { 516 SkSourceGammaTreatment gamma Treatment) {
517 SkAutoTUnref<GrTexture> original(this->refOriginalTexture(willBeMipped, gamm aTreatment)); 517 SkAutoTUnref<GrTexture> original(this->refOriginalTexture(willBeMipped, gamm aTreatment));
518 if (!original) { 518 if (!original) {
519 return nullptr; 519 return nullptr;
520 } 520 }
521 return copy_on_gpu(original, nullptr, copyParams); 521 return copy_on_gpu(original, nullptr, copyParams);
522 } 522 }
OLDNEW
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/GrTextureToYUVPlanes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698