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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 2037413002: Add SkSourceGammaTreatment enum so we know how to create mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DM compilation Created 4 years, 6 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 | « gm/texturedomaineffect.cpp ('k') | include/core/SkImageInfo.h » ('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 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 // This test only works with the GPU backend. 8 // This test only works with the GPU backend.
9 9
10 #include "gm.h" 10 #include "gm.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return; 75 return;
76 } 76 }
77 77
78 GrContext* context = canvas->getGrContext(); 78 GrContext* context = canvas->getGrContext();
79 if (!context) { 79 if (!context) {
80 return; 80 return;
81 } 81 }
82 82
83 SkAutoTUnref<GrTexture> texture[3]; 83 SkAutoTUnref<GrTexture> texture[3];
84 texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], 84 texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0],
85 GrTextureParams::ClampBilerp() )); 85 GrTextureParams::ClampBilerp() ,
86 SkSourceGammaTreatment::kRespe ct));
86 texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], 87 texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1],
87 GrTextureParams::ClampBilerp() )); 88 GrTextureParams::ClampBilerp() ,
89 SkSourceGammaTreatment::kRespe ct));
88 texture[2].reset(GrRefCachedBitmapTexture(context, fBmp[2], 90 texture[2].reset(GrRefCachedBitmapTexture(context, fBmp[2],
89 GrTextureParams::ClampBilerp() )); 91 GrTextureParams::ClampBilerp() ,
92 SkSourceGammaTreatment::kRespe ct));
90 93
91 if (!texture[0] || !texture[1] || !texture[2]) { 94 if (!texture[0] || !texture[1] || !texture[2]) {
92 return; 95 return;
93 } 96 }
94 97
95 static const SkScalar kDrawPad = 10.f; 98 static const SkScalar kDrawPad = 10.f;
96 static const SkScalar kTestPad = 10.f; 99 static const SkScalar kTestPad = 10.f;
97 static const SkScalar kColorSpaceOffset = 36.f; 100 static const SkScalar kColorSpaceOffset = 36.f;
98 SkISize sizes[3] = {{YSIZE, YSIZE}, {USIZE, USIZE}, {VSIZE, VSIZE}}; 101 SkISize sizes[3] = {{YSIZE, YSIZE}, {USIZE, USIZE}, {VSIZE, VSIZE}};
99 102
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 private: 140 private:
138 SkBitmap fBmp[3]; 141 SkBitmap fBmp[3];
139 142
140 typedef GM INHERITED; 143 typedef GM INHERITED;
141 }; 144 };
142 145
143 DEF_GM(return new YUVtoRGBEffect;) 146 DEF_GM(return new YUVtoRGBEffect;)
144 } 147 }
145 148
146 #endif 149 #endif
OLDNEW
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | include/core/SkImageInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698