OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_NULL_TRANSPORT_SURFACE_H_ |
| 6 #define CONTENT_COMMON_GPU_NULL_TRANSPORT_SURFACE_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "content/common/gpu/image_transport_surface.h" |
| 10 #include "ui/gfx/native_widget_types.h" |
| 11 |
| 12 namespace content { |
| 13 |
| 14 // Used when the GPU process is not involved in frame transport, but frame |
| 15 // resources are exchanged between client and target directly (such as in |
| 16 // delegated rendering). |
| 17 class NullTransportSurface : public PassThroughImageTransportSurface { |
| 18 public: |
| 19 NullTransportSurface(GpuChannelManager* manager, |
| 20 GpuCommandBufferStub* stub, |
| 21 const gfx::GLSurfaceHandle& handle); |
| 22 |
| 23 // gfx::GLSurface implementation. |
| 24 virtual bool Initialize() OVERRIDE; |
| 25 virtual void Destroy() OVERRIDE; |
| 26 virtual bool SwapBuffers() OVERRIDE; |
| 27 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; |
| 28 |
| 29 protected: |
| 30 virtual ~NullTransportSurface(); |
| 31 |
| 32 virtual void SendVSyncUpdateIfAvailable() OVERRIDE; |
| 33 |
| 34 private: |
| 35 uint32 parent_client_id_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(NullTransportSurface); |
| 38 }; |
| 39 |
| 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_COMMON_GPU_NULL_TRANSPORT_SURFACE_H_ |
OLD | NEW |