| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // manually. Returns an opaque identifier for the new backing store. | 76 // manually. Returns an opaque identifier for the new backing store. |
| 77 // There are two versions of this method: one for use with the IOSurface | 77 // There are two versions of this method: one for use with the IOSurface |
| 78 // available in Mac OS X 10.6; and, one for use with the | 78 // available in Mac OS X 10.6; and, one for use with the |
| 79 // TransportDIB-based version used on Mac OS X 10.5. | 79 // TransportDIB-based version used on Mac OS X 10.5. |
| 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. |
| 87 virtual uint64 GetSurfaceId(); |
| 86 #endif | 88 #endif |
| 87 | 89 |
| 88 // Sets a callback which is called when a SwapBuffers command is processed. | 90 // Sets a callback which is called when a SwapBuffers command is processed. |
| 89 // Must be called after Initialize(). | 91 // Must be called after Initialize(). |
| 90 // It is not defined on which thread this callback is called. | 92 // It is not defined on which thread this callback is called. |
| 91 virtual void SetSwapBuffersCallback(Callback0::Type* callback); | 93 virtual void SetSwapBuffersCallback(Callback0::Type* callback); |
| 92 | 94 |
| 93 // Get the GLES2Decoder associated with this processor. | 95 // Get the GLES2Decoder associated with this processor. |
| 94 gles2::GLES2Decoder* decoder() const { return decoder_.get(); } | 96 gles2::GLES2Decoder* decoder() const { return decoder_.get(); } |
| 95 | 97 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 122 scoped_ptr<AcceleratedSurface> surface_; | 124 scoped_ptr<AcceleratedSurface> surface_; |
| 123 #endif | 125 #endif |
| 124 | 126 |
| 125 ScopedRunnableMethodFactory<GPUProcessor> method_factory_; | 127 ScopedRunnableMethodFactory<GPUProcessor> method_factory_; |
| 126 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; | 128 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; |
| 127 }; | 129 }; |
| 128 | 130 |
| 129 } // namespace gpu | 131 } // namespace gpu |
| 130 | 132 |
| 131 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 133 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
| OLD | NEW |