OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "content/common/content_export.h" |
15 #include "ipc/ipc_listener.h" | 16 #include "ipc/ipc_listener.h" |
16 #include "ipc/ipc_message.h" | 17 #include "ipc/ipc_message.h" |
17 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
18 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
19 #include "ui/gfx/size.h" | 20 #include "ui/gfx/size.h" |
20 #include "ui/gl/gl_surface.h" | 21 #include "ui/gl/gl_surface.h" |
21 #include "ui/surface/transport_dib.h" | 22 #include "ui/surface/transport_dib.h" |
22 | 23 |
23 struct AcceleratedSurfaceMsg_BufferPresented_Params; | 24 struct AcceleratedSurfaceMsg_BufferPresented_Params; |
24 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 25 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual void OnBufferPresented( | 62 virtual void OnBufferPresented( |
62 const AcceleratedSurfaceMsg_BufferPresented_Params& params) = 0; | 63 const AcceleratedSurfaceMsg_BufferPresented_Params& params) = 0; |
63 virtual void OnResizeViewACK() = 0; | 64 virtual void OnResizeViewACK() = 0; |
64 virtual void OnResize(gfx::Size size) = 0; | 65 virtual void OnResize(gfx::Size size) = 0; |
65 | 66 |
66 // Creates the appropriate surface depending on the GL implementation. | 67 // Creates the appropriate surface depending on the GL implementation. |
67 static scoped_refptr<gfx::GLSurface> | 68 static scoped_refptr<gfx::GLSurface> |
68 CreateSurface(GpuChannelManager* manager, | 69 CreateSurface(GpuChannelManager* manager, |
69 GpuCommandBufferStub* stub, | 70 GpuCommandBufferStub* stub, |
70 const gfx::GLSurfaceHandle& handle); | 71 const gfx::GLSurfaceHandle& handle); |
| 72 #if defined(OS_MACOSX) |
| 73 CONTENT_EXPORT static void SetAllowOSMesaForTesting(bool allow); |
| 74 #endif |
71 | 75 |
72 virtual gfx::Size GetSize() = 0; | 76 virtual gfx::Size GetSize() = 0; |
73 | 77 |
74 protected: | 78 protected: |
75 virtual ~ImageTransportSurface(); | 79 virtual ~ImageTransportSurface(); |
76 | 80 |
77 private: | 81 private: |
78 DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface); | 82 DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface); |
79 }; | 83 }; |
80 | 84 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 bool did_set_swap_interval_; | 193 bool did_set_swap_interval_; |
190 bool did_unschedule_; | 194 bool did_unschedule_; |
191 bool is_swap_buffers_pending_; | 195 bool is_swap_buffers_pending_; |
192 | 196 |
193 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); | 197 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); |
194 }; | 198 }; |
195 | 199 |
196 } // namespace content | 200 } // namespace content |
197 | 201 |
198 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 202 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
OLD | NEW |