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

Unified Diff: content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc

Issue 2686173003: Remove uses of skia::GetWritablePixels(PaintCanvas) (Closed)
Patch Set: Add more deps 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
« no previous file with comments | « content/renderer/media/webmediaplayer_ms_compositor.cc ('k') | media/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
diff --git a/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc b/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
index dc0a3ee1c2f027df3a90094b50bc0a05f9ececf7..77b5241932992dc95f38143209e770ce3ec27087 100644
--- a/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
+++ b/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
@@ -10,6 +10,7 @@
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
+#include "cc/paint/paint_surface.h"
#include "content/renderer/media/webrtc/webrtc_video_frame_adapter.h"
#include "content/renderer/render_thread_impl.h"
#include "media/base/timestamp_constants.h"
@@ -20,7 +21,6 @@
#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/libyuv/include/libyuv/convert_from.h"
#include "third_party/libyuv/include/libyuv/scale.h"
-#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/webrtc/api/video/video_rotation.h"
namespace content {
@@ -101,7 +101,7 @@ class WebRtcVideoCapturerAdapter::TextureFrameCopier
frame->format() == media::PIXEL_FORMAT_UYVY ||
frame->format() == media::PIXEL_FORMAT_NV12);
ScopedWaitableEvent event(waiter);
- sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(
+ sk_sp<cc::PaintSurface> surface = cc::PaintSurface::MakeRasterN32Premul(
frame->visible_rect().width(), frame->visible_rect().height());
if (!surface || !provider_) {
@@ -121,7 +121,7 @@ class WebRtcVideoCapturerAdapter::TextureFrameCopier
SkPixmap pixmap;
const bool result = surface->getCanvas()->peekPixels(&pixmap);
- DCHECK(result) << "Error trying to access SkSurface's pixels";
+ DCHECK(result) << "Error trying to access PaintSurface's pixels";
const uint32 source_pixel_format =
(kN32_SkColorType == kRGBA_8888_SkColorType) ? cricket::FOURCC_ABGR
: cricket::FOURCC_ARGB;
« no previous file with comments | « content/renderer/media/webmediaplayer_ms_compositor.cc ('k') | media/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698