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

Unified Diff: content/renderer/media/image_capture_frame_grabber.cc

Issue 2717943002: Fix cc/paint skia type mismatches (Closed)
Patch Set: Rebase Created 3 years, 10 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
Index: content/renderer/media/image_capture_frame_grabber.cc
diff --git a/content/renderer/media/image_capture_frame_grabber.cc b/content/renderer/media/image_capture_frame_grabber.cc
index da04728901a2f7ce8f53976c51008b2e1d6a1e11..863e5aee303d192b63d1cb1f03d61bae07aa4503 100644
--- a/content/renderer/media/image_capture_frame_grabber.cc
+++ b/content/renderer/media/image_capture_frame_grabber.cc
@@ -70,12 +70,12 @@ void ImageCaptureFrameGrabber::SingleShotFrameHandler::OnVideoFrameOnIOThread(
const SkImageInfo info = SkImageInfo::MakeN32(
frame->visible_rect().width(), frame->visible_rect().height(), alpha);
- sk_sp<cc::PaintSurface> surface = cc::PaintSurface::MakeRaster(info);
+ sk_sp<SkSurface> surface = SkSurface::MakeRaster(info);
DCHECK(surface);
SkPixmap pixmap;
- if (!cc::ToPixmap(surface->getCanvas(), &pixmap)) {
- DLOG(ERROR) << "Error trying to map PaintSurface's pixels";
+ if (!skia::GetWritablePixels(surface->getCanvas(), &pixmap)) {
+ DLOG(ERROR) << "Error trying to map SkSurface's pixels";
callback.Run(sk_sp<SkImage>());
return;
}

Powered by Google App Engine
This is Rietveld 408576698