fix bookmaker bot
Drawing image subsets too many times causes fiddle to fail where it used to succeed. Reduce the number of draws for now to work around this. TBR=jcgregorio@google.com NOTRY=true Docs-Preview: https://skia.org/?cl=143100 Bug: skia:8180 Change-Id: I2610dc7575ed0e6eec1ee3c88e1f9ccc7b6a716e Reviewed-on: https://skia-review.googlesource.com/143100 Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
This commit is contained in:
parent
8afa86c637
commit
c30382fe05
@ -1758,8 +1758,8 @@ pixels in Image could not be read or copied.
|
||||
#Example
|
||||
#Image 3
|
||||
canvas->scale(.5f, .5f);
|
||||
const int width = 32;
|
||||
const int height = 32;
|
||||
const int width = 64;
|
||||
const int height = 64;
|
||||
for (int y = 0; y < 512; y += height ) {
|
||||
for (int x = 0; x < 512; x += width ) {
|
||||
sk_sp<SkImage> subset(image->makeSubset({x, y, x + width, y + height}));
|
||||
|
@ -2300,7 +2300,7 @@ partial or full <a href='#Image'>Image</a>, or nullptr
|
||||
|
||||
### Example
|
||||
|
||||
<div><fiddle-embed name="93669037c9eb9d142e7776b9f936fa96"></fiddle-embed></div>
|
||||
<div><fiddle-embed name="889e495ce3e3b3bacc96e8230932331c"></fiddle-embed></div>
|
||||
|
||||
### See Also
|
||||
|
||||
|
@ -5793,10 +5793,10 @@
|
||||
"name": "SkImage::makeShader_2"
|
||||
},
|
||||
"SkImage_makeSubset": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n canvas->scale(.5f, .5f);\n const int width = 32;\n const int height = 32;\n for (int y = 0; y < 512; y += height ) {\n for (int x = 0; x < 512; x += width ) {\n sk_sp<SkImage> subset(image->makeSubset({x, y, x + width, y + height}));\n canvas->drawImage(subset, x * 3 / 2, y * 3 / 2);\n }\n }\n}",
|
||||
"code": "void draw(SkCanvas* canvas) {\n canvas->scale(.5f, .5f);\n const int width = 64;\n const int height = 64;\n for (int y = 0; y < 512; y += height ) {\n for (int x = 0; x < 512; x += width ) {\n sk_sp<SkImage> subset(image->makeSubset({x, y, x + width, y + height}));\n canvas->drawImage(subset, x * 3 / 2, y * 3 / 2);\n }\n }\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "93669037c9eb9d142e7776b9f936fa96",
|
||||
"hash": "889e495ce3e3b3bacc96e8230932331c",
|
||||
"file": "SkImage_Reference",
|
||||
"name": "SkImage::makeSubset"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user