Migrate uses of SkSurface factories
In http://review.skia.org/687639, many SkSurface static methods were moved and one was deleted (SkSurface::MakeRasterN32Premul). This changes the calls in Chromium to match those moved functions. There should be no functional difference and everything was done pretty mechanically (e.g. find and replace, regexes, git cl format). Bug: skia:13983 Change-Id: Iffbfae6b03bd002fe833ae994089318b051b0d43 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4518554 Commit-Queue: Kevin Lubick <kjlubick@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1143250}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
72164ee68b
commit
682f84e1ca
android_webview/test/shell/src/draw_fn
cc
layers
paint
raster
tiles
trees
chrome/browser/vr
content/browser/gpu
media/renderers
pdf
skia/ext
testing/libfuzzer/fuzzers
third_party/blink/renderer
bindings
core
v8
serialization
core
clipboard
html
imagebitmap
layout
offscreencanvas
page
paint
modules
webcodecs
platform
ui
base
gfx
ozone
demo
platform
drm
flatland
headless
scenic
wayland
@ -213,8 +213,8 @@ void PaintManager::DoPaint() {
|
||||
: gfx::Size();
|
||||
gfx::Size new_size = GetNewContextSize(old_size, pending_size_);
|
||||
if (old_size != new_size || !surface_) {
|
||||
surface_ =
|
||||
SkSurface::MakeRasterN32Premul(new_size.width(), new_size.height());
|
||||
surface_ = SkSurfaces::Raster(
|
||||
SkImageInfo::MakeN32Premul(new_size.width(), new_size.height()));
|
||||
DCHECK(surface_);
|
||||
|
||||
// TODO(crbug.com/1317832): Can we guarantee repainting some other way?
|
||||
|
@ -48,7 +48,8 @@ testing::AssertionResult MatchesPngFile(
|
||||
|
||||
sk_sp<SkSurface> CreateSkiaSurfaceForTesting(const gfx::Size& size,
|
||||
SkColor color) {
|
||||
auto surface = SkSurface::MakeRasterN32Premul(size.width(), size.height());
|
||||
auto surface = SkSurfaces::Raster(
|
||||
SkImageInfo::MakeN32Premul(size.width(), size.height()));
|
||||
surface->getCanvas()->clear(color);
|
||||
return surface;
|
||||
}
|
||||
|
Reference in New Issue
Block a user