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

Unified Diff: content/common/gpu/client/command_buffer_proxy_impl.cc

Issue 22935009: Add content::SurfaceCapturer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_stride
Patch Set: a1372c98 Rebase for commit. Created 7 years, 4 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/common/gpu/client/command_buffer_proxy_impl.cc
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index 1056939d8f0deeea7c5b8971c1fb13359fd9a939..90271647069457afad3c098c24216c47adf4121d 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -10,6 +10,7 @@
#include "base/memory/shared_memory.h"
#include "base/stl_util.h"
#include "content/common/child_process_messages.h"
+#include "content/common/gpu/client/gl_surface_capturer_host.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
#include "content/common/gpu/gpu_memory_allocation.h"
@@ -500,6 +501,25 @@ CommandBufferProxyImpl::CreateVideoDecoder(
return vda.Pass();
}
+scoped_ptr<SurfaceCapturer> CommandBufferProxyImpl::CreateSurfaceCapturer(
+ SurfaceCapturer::Client* client) {
+ int capturer_route_id;
+ scoped_ptr<SurfaceCapturer> capturer;
+ if (!Send(new GpuCommandBufferMsg_CreateSurfaceCapturer(
+ route_id_, &capturer_route_id))) {
+ LOG(ERROR) << "Send(GpuCommandBufferMsg_CreateSurfaceCapturer) failed";
+ return capturer.Pass();
+ }
+
+ if (capturer_route_id < 0) {
+ DLOG(ERROR) << "Failed create surface capturer";
+ return capturer.Pass();
+ }
+
+ capturer.reset(new GLSurfaceCapturerHost(capturer_route_id, client, this));
+ return capturer.Pass();
+}
+
gpu::error::Error CommandBufferProxyImpl::GetLastError() {
return last_state_.error;
}
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.h ('k') | content/common/gpu/client/gl_surface_capturer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698