OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 ANDROID_WEBVIEW_BROWSER_GRAPHIC_BUFFER_IMPL_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_GRAPHIC_BUFFER_IMPL_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "cc/resources/graphic_buffer.h" |
| 11 #include "ui/gfx/size.h" |
| 12 |
| 13 struct AwDrawGLFunctionTable; |
| 14 |
| 15 namespace android_webview { |
| 16 |
| 17 class GraphicBufferImpl : public cc::GraphicBuffer { |
| 18 public: |
| 19 static void SetAwDrawGLFunctionTable(AwDrawGLFunctionTable* table); |
| 20 GraphicBufferImpl(const gfx::Size& size); |
| 21 virtual ~GraphicBufferImpl(); |
| 22 |
| 23 // methods from GraphicBuffer |
| 24 virtual bool LockForRead(void** vaddr) OVERRIDE; |
| 25 virtual bool LockForWrite(void** vaddr) OVERRIDE; |
| 26 virtual bool Unlock() OVERRIDE; |
| 27 virtual gfx::Size GetSize() OVERRIDE; |
| 28 virtual void* GetNativeBuffer() OVERRIDE; |
| 29 virtual uint32 GetStride() OVERRIDE; |
| 30 |
| 31 private: |
| 32 int buffer_id_; |
| 33 gfx::Size size_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(GraphicBufferImpl); |
| 36 }; |
| 37 |
| 38 } // namespace android_webview |
| 39 |
| 40 #endif // ANDROID_WEBVIEW_BROWSER_GRAPHIC_BUFFER_IMPL_H_ |
OLD | NEW |