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

Unified Diff: gpu/ipc/service/pass_through_image_transport_surface.h

Issue 2492583002: Decouple PassThroughImageTransportSurface from GpuCommandBufferStub (Closed)
Patch Set: Addressed Antoine's comments Created 4 years, 1 month 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: gpu/ipc/service/pass_through_image_transport_surface.h
diff --git a/gpu/ipc/service/pass_through_image_transport_surface.h b/gpu/ipc/service/pass_through_image_transport_surface.h
index edefbfebcd1ecd8a85aec148349ab59a2ce90520..941120da81db610ecfb1b71b03afed6049c52ff9 100644
--- a/gpu/ipc/service/pass_through_image_transport_surface.h
+++ b/gpu/ipc/service/pass_through_image_transport_surface.h
@@ -13,19 +13,20 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "gpu/ipc/service/image_transport_surface.h"
+#include "gpu/ipc/service/image_transport_surface_delegate.h"
#include "ui/events/latency_info.h"
#include "ui/gl/gl_surface.h"
namespace gpu {
class GpuChannelManager;
-class GpuCommandBufferStub;
// An implementation of ImageTransportSurface that implements GLSurface through
// GLSurfaceAdapter, thereby forwarding GLSurface methods through to it.
class PassThroughImageTransportSurface : public gl::GLSurfaceAdapter {
public:
- PassThroughImageTransportSurface(GpuCommandBufferStub* stub,
- gl::GLSurface* surface);
+ PassThroughImageTransportSurface(
+ base::WeakPtr<ImageTransportSurfaceDelegate> delegate,
+ gl::GLSurface* surface);
// GLSurface implementation.
bool Initialize(gl::GLSurface::Format format) override;
@@ -64,7 +65,7 @@ class PassThroughImageTransportSurface : public gl::GLSurfaceAdapter {
GLSurface::SwapCompletionCallback callback,
gfx::SwapResult result);
- base::WeakPtr<GpuCommandBufferStub> stub_;
+ base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;
bool did_set_swap_interval_;
std::vector<ui::LatencyInfo> latency_info_;
base::WeakPtrFactory<PassThroughImageTransportSurface> weak_ptr_factory_;
« no previous file with comments | « gpu/ipc/service/image_transport_surface_win.cc ('k') | gpu/ipc/service/pass_through_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698