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

Side by Side Diff: gm/xfermodes3.cpp

Issue 2074103004: Revert of More removal of SkColorProfileType... (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/textblobrandomfont.cpp ('k') | gyp/core.gypi » ('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 2013 Google Inc. 2 * Copyright 2013 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 "gm.h" 8 #include "gm.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 * saveLayer() uses the texture cache. This means that the actual render tar get may be larger 119 * saveLayer() uses the texture cache. This means that the actual render tar get may be larger
120 * than the layer. Because the clip will contain the layer's bounds, no draw s will be full-RT. 120 * than the layer. Because the clip will contain the layer's bounds, no draw s will be full-RT.
121 * So when running on a GPU canvas we explicitly create a temporary canvas u sing a texture with 121 * So when running on a GPU canvas we explicitly create a temporary canvas u sing a texture with
122 * dimensions exactly matching the layer size. 122 * dimensions exactly matching the layer size.
123 */ 123 */
124 sk_sp<SkSurface> possiblyCreateTempSurface(SkCanvas* baseCanvas, int w, int h) { 124 sk_sp<SkSurface> possiblyCreateTempSurface(SkCanvas* baseCanvas, int w, int h) {
125 #if SK_SUPPORT_GPU 125 #if SK_SUPPORT_GPU
126 GrContext* context = baseCanvas->getGrContext(); 126 GrContext* context = baseCanvas->getGrContext();
127 SkImageInfo baseInfo = baseCanvas->imageInfo(); 127 SkImageInfo baseInfo = baseCanvas->imageInfo();
128 SkImageInfo info = SkImageInfo::Make(w, h, baseInfo.colorType(), baseInf o.alphaType(), 128 SkImageInfo info = SkImageInfo::Make(w, h, baseInfo.colorType(), baseInf o.alphaType(),
129 sk_ref_sp(baseInfo.colorSpace())); 129 baseInfo.profileType());
130 SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType); 130 SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType);
131 baseCanvas->getProps(&canvasProps); 131 baseCanvas->getProps(&canvasProps);
132 return SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info, 0, &c anvasProps); 132 return SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info, 0, &c anvasProps);
133 #else 133 #else
134 return nullptr; 134 return nullptr;
135 #endif 135 #endif
136 } 136 }
137 137
138 void drawMode(SkCanvas* canvas, 138 void drawMode(SkCanvas* canvas,
139 int x, int y, int w, int h, 139 int x, int y, int w, int h,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 sk_sp<SkShader> fBmpShader; 221 sk_sp<SkShader> fBmpShader;
222 222
223 typedef GM INHERITED; 223 typedef GM INHERITED;
224 }; 224 };
225 225
226 ////////////////////////////////////////////////////////////////////////////// 226 //////////////////////////////////////////////////////////////////////////////
227 227
228 DEF_GM(return new Xfermodes3GM;) 228 DEF_GM(return new Xfermodes3GM;)
229 229
230 } 230 }
OLDNEW
« no previous file with comments | « gm/textblobrandomfont.cpp ('k') | gyp/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698