OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/surface/transport_dib.h" | 10 #include "app/surface/transport_dib.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual uint64 SetWindowSizeForIOSurface(const gfx::Size& size); | 80 virtual uint64 SetWindowSizeForIOSurface(const gfx::Size& size); |
81 virtual TransportDIB::Handle SetWindowSizeForTransportDIB( | 81 virtual TransportDIB::Handle SetWindowSizeForTransportDIB( |
82 const gfx::Size& size); | 82 const gfx::Size& size); |
83 virtual void SetTransportDIBAllocAndFree( | 83 virtual void SetTransportDIBAllocAndFree( |
84 Callback2<size_t, TransportDIB::Handle*>::Type* allocator, | 84 Callback2<size_t, TransportDIB::Handle*>::Type* allocator, |
85 Callback1<TransportDIB::Id>::Type* deallocator); | 85 Callback1<TransportDIB::Id>::Type* deallocator); |
86 // Returns the id of the current IOSurface, or 0. | 86 // Returns the id of the current IOSurface, or 0. |
87 virtual uint64 GetSurfaceId(); | 87 virtual uint64 GetSurfaceId(); |
88 #endif | 88 #endif |
89 | 89 |
| 90 // Sets a callback that is called when a glResizeCHROMIUM command |
| 91 // is processed. |
| 92 virtual void SetResizeCallback(Callback1<gfx::Size>::Type* callback); |
| 93 |
90 // Sets a callback which is called when a SwapBuffers command is processed. | 94 // Sets a callback which is called when a SwapBuffers command is processed. |
91 // Must be called after Initialize(). | 95 // Must be called after Initialize(). |
92 // It is not defined on which thread this callback is called. | 96 // It is not defined on which thread this callback is called. |
93 virtual void SetSwapBuffersCallback(Callback0::Type* callback); | 97 virtual void SetSwapBuffersCallback(Callback0::Type* callback); |
94 | 98 |
95 // Get the GLES2Decoder associated with this processor. | 99 // Get the GLES2Decoder associated with this processor. |
96 gles2::GLES2Decoder* decoder() const { return decoder_.get(); } | 100 gles2::GLES2Decoder* decoder() const { return decoder_.get(); } |
97 | 101 |
98 protected: | 102 protected: |
99 // Perform common initialization. Takes ownership of GLContext. | 103 // Perform common initialization. Takes ownership of GLContext. |
(...skipping 24 matching lines...) Expand all Loading... |
124 scoped_ptr<AcceleratedSurface> surface_; | 128 scoped_ptr<AcceleratedSurface> surface_; |
125 #endif | 129 #endif |
126 | 130 |
127 ScopedRunnableMethodFactory<GPUProcessor> method_factory_; | 131 ScopedRunnableMethodFactory<GPUProcessor> method_factory_; |
128 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; | 132 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; |
129 }; | 133 }; |
130 | 134 |
131 } // namespace gpu | 135 } // namespace gpu |
132 | 136 |
133 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 137 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
OLD | NEW |