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

Side by Side Diff: gm/drawbitmaprect.cpp

Issue 2147053002: Remove GrWrapTextureInBitmap from public API (Closed) Base URL: https://chromium.googlesource.com/skia.git@wrap
Patch Set: rm SK_API Created 4 years, 5 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 | « no previous file | include/gpu/SkGr.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
11 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
12 #include "SkGradientShader.h" 12 #include "SkGradientShader.h"
13 #include "SkImage.h" 13 #include "SkImage.h"
14 #include "SkImage_Base.h" 14 #include "SkImage_Base.h"
15 #include "SkMathPriv.h" 15 #include "SkMathPriv.h"
16 #include "SkShader.h" 16 #include "SkShader.h"
17 #include "SkSurface.h" 17 #include "SkSurface.h"
18 18
19 #if SK_SUPPORT_GPU 19 #if SK_SUPPORT_GPU
20 #include "SkGr.h" 20 #include "SkGrPriv.h"
21 #endif 21 #endif
22 22
23 static SkBitmap make_chessbm(int w, int h) { 23 static SkBitmap make_chessbm(int w, int h) {
24 SkBitmap bm; 24 SkBitmap bm;
25 bm.allocN32Pixels(w, h); 25 bm.allocN32Pixels(w, h);
26 26
27 for (int y = 0; y < bm.height(); y++) { 27 for (int y = 0; y < bm.height(); y++) {
28 uint32_t* p = bm.getAddr32(0, y); 28 uint32_t* p = bm.getAddr32(0, y);
29 for (int x = 0; x < bm.width(); x++) { 29 for (int x = 0; x < bm.width(); x++) {
30 p[x] = ((x + y) & 1) ? SK_ColorWHITE : SK_ColorBLACK; 30 p[x] = ((x + y) & 1) ? SK_ColorWHITE : SK_ColorBLACK;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 canvas->drawBitmapRect(bm, srcRect, dstRect, &paint); 220 canvas->drawBitmapRect(bm, srcRect, dstRect, &paint);
221 } 221 }
222 } 222 }
223 223
224 private: 224 private:
225 typedef skiagm::GM INHERITED; 225 typedef skiagm::GM INHERITED;
226 }; 226 };
227 227
228 DEF_GM( return new DrawBitmapRectGM(canvasproc, nullptr); ) 228 DEF_GM( return new DrawBitmapRectGM(canvasproc, nullptr); )
229 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); ) 229 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); )
OLDNEW
« no previous file with comments | « no previous file | include/gpu/SkGr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698