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

Side by Side Diff: gm/xfermodes3.cpp

Issue 1734043002: Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/textblobmixedsizes.cpp ('k') | include/core/SkSurface.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 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 * than the layer. Because the clip will contain the layer's bounds, no draw s will be full-RT. 121 * than the layer. Because the clip will contain the layer's bounds, no draw s will be full-RT.
122 * So when running on a GPU canvas we explicitly create a temporary canvas u sing a texture with 122 * So when running on a GPU canvas we explicitly create a temporary canvas u sing a texture with
123 * dimensions exactly matching the layer size. 123 * dimensions exactly matching the layer size.
124 */ 124 */
125 SkSurface* possiblyCreateTempSurface(SkCanvas* baseCanvas, int w, int h) { 125 SkSurface* possiblyCreateTempSurface(SkCanvas* baseCanvas, int w, int h) {
126 #if SK_SUPPORT_GPU 126 #if SK_SUPPORT_GPU
127 GrContext* context = baseCanvas->getGrContext(); 127 GrContext* context = baseCanvas->getGrContext();
128 SkImageInfo baseInfo = baseCanvas->imageInfo(); 128 SkImageInfo baseInfo = baseCanvas->imageInfo();
129 SkImageInfo info = SkImageInfo::Make(w, h, baseInfo.colorType(), baseInf o.alphaType(), 129 SkImageInfo info = SkImageInfo::Make(w, h, baseInfo.colorType(), baseInf o.alphaType(),
130 baseInfo.profileType()); 130 baseInfo.profileType());
131 return SkSurface::NewRenderTarget(context, SkBudgeted::kNo, info, 0, nul lptr); 131 return SkSurface::NewRenderTarget(context, SkSurface::kNo_Budgeted, info , 0, nullptr);
132 #else 132 #else
133 return nullptr; 133 return nullptr;
134 #endif 134 #endif
135 } 135 }
136 136
137 void drawMode(SkCanvas* canvas, 137 void drawMode(SkCanvas* canvas,
138 int x, int y, int w, int h, 138 int x, int y, int w, int h,
139 const SkPaint& modePaint, SkSurface* surface) { 139 const SkPaint& modePaint, SkSurface* surface) {
140 canvas->save(); 140 canvas->save();
141 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); 141 canvas->translate(SkIntToScalar(x), SkIntToScalar(y));
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 SkAutoTUnref<SkShader> fBmpShader; 225 SkAutoTUnref<SkShader> fBmpShader;
226 226
227 typedef GM INHERITED; 227 typedef GM INHERITED;
228 }; 228 };
229 229
230 ////////////////////////////////////////////////////////////////////////////// 230 //////////////////////////////////////////////////////////////////////////////
231 231
232 DEF_GM(return new Xfermodes3GM;) 232 DEF_GM(return new Xfermodes3GM;)
233 233
234 } 234 }
OLDNEW
« no previous file with comments | « gm/textblobmixedsizes.cpp ('k') | include/core/SkSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698