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

Side by Side Diff: gm/imagefromyuvtextures.cpp

Issue 2242553002: Allow vulkan to upload data to testing textures with optimal layouts (Closed) Base URL: https://skia.googlesource.com/skia.git@yuv
Patch Set: fix cast Created 4 years, 4 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 | src/gpu/vk/GrVkGpu.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 // 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 13 matching lines...) Expand all
24 ImageFromYUVTextures() { 24 ImageFromYUVTextures() {
25 this->setBGColor(0xFFFFFFFF); 25 this->setBGColor(0xFFFFFFFF);
26 } 26 }
27 27
28 protected: 28 protected:
29 SkString onShortName() override { 29 SkString onShortName() override {
30 return SkString("image_from_yuv_textures"); 30 return SkString("image_from_yuv_textures");
31 } 31 }
32 32
33 SkISize onISize() override { 33 SkISize onISize() override {
34 return SkISize::Make(50, 135); 34 return SkISize::Make(50, 175);
35 } 35 }
36 36
37 void onOnceBeforeDraw() override { 37 void onOnceBeforeDraw() override {
38 // We create an RGB bitmap and then extract YUV bmps where the U and V b itmaps are 38 // We create an RGB bitmap and then extract YUV bmps where the U and V b itmaps are
39 // subsampled by 2 in both dimensions. 39 // subsampled by 2 in both dimensions.
40 SkPaint paint; 40 SkPaint paint;
41 static const SkColor kColors[] = 41 static const SkColor kColors[] =
42 { SK_ColorBLUE, SK_ColorYELLOW, SK_ColorGREEN, SK_ColorWHITE }; 42 { SK_ColorBLUE, SK_ColorYELLOW, SK_ColorGREEN, SK_ColorWHITE };
43 paint.setShader(SkGradientShader::MakeRadial(SkPoint::Make(0,0), kBmpSiz e / 2.f, kColors, 43 paint.setShader(SkGradientShader::MakeRadial(SkPoint::Make(0,0), kBmpSiz e / 2.f, kColors,
44 nullptr, SK_ARRAY_COUNT(kCo lors), 44 nullptr, SK_ARRAY_COUNT(kCo lors),
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 static const int kBmpSize = 32; 164 static const int kBmpSize = 32;
165 165
166 typedef GM INHERITED; 166 typedef GM INHERITED;
167 }; 167 };
168 168
169 DEF_GM(return new ImageFromYUVTextures;) 169 DEF_GM(return new ImageFromYUVTextures;)
170 } 170 }
171 171
172 #endif 172 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698