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

Unified Diff: content/renderer/skia_benchmarking_extension.cc

Issue 1823133002: Use sk_sp-based picture recording APIs in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/browser_view_renderer.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/skia_benchmarking_extension.cc
diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc
index f5180d0fd429123b35f52d5f8fea8fb036bc071d..45189302691cc46f5e41f5c2a22177ec322db5fb 100644
--- a/content/renderer/skia_benchmarking_extension.cc
+++ b/content/renderer/skia_benchmarking_extension.cc
@@ -40,7 +40,7 @@ namespace {
class Picture {
public:
gfx::Rect layer_rect;
- skia::RefPtr<SkPicture> picture;
+ sk_sp<SkPicture> picture;
};
bool DecodeBitmap(const void* buffer, size_t size, SkBitmap* bm) {
@@ -70,13 +70,14 @@ scoped_ptr<Picture> CreatePictureFromEncodedString(const std::string& encoded) {
base::Base64Decode(encoded, &decoded);
SkMemoryStream stream(decoded.data(), decoded.size());
- SkPicture* skpicture = SkPicture::CreateFromStream(&stream, &DecodeBitmap);
+ sk_sp<SkPicture> skpicture =
+ SkPicture::MakeFromStream(&stream, &DecodeBitmap);
if (!skpicture)
return nullptr;
scoped_ptr<Picture> picture(new Picture);
picture->layer_rect = gfx::SkIRectToRect(skpicture->cullRect().roundOut());
- picture->picture = skia::AdoptRef(skpicture);
+ picture->picture = std::move(skpicture);
return picture;
}
« no previous file with comments | « android_webview/browser/browser_view_renderer.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698