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 #include "gpu/command_buffer/tests/gl_manager.h" | 5 #include "gpu/command_buffer/tests/gl_manager.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 public: | 49 public: |
50 GpuMemoryBufferImpl(base::RefCountedBytes* bytes, | 50 GpuMemoryBufferImpl(base::RefCountedBytes* bytes, |
51 const gfx::Size& size, | 51 const gfx::Size& size, |
52 unsigned internalformat) | 52 unsigned internalformat) |
53 : bytes_(bytes), | 53 : bytes_(bytes), |
54 size_(size), | 54 size_(size), |
55 internalformat_(internalformat), | 55 internalformat_(internalformat), |
56 mapped_(false) {} | 56 mapped_(false) {} |
57 | 57 |
58 // Overridden from gfx::GpuMemoryBuffer: | 58 // Overridden from gfx::GpuMemoryBuffer: |
59 virtual void* Map() OVERRIDE { | 59 virtual void* Map() override { |
60 mapped_ = true; | 60 mapped_ = true; |
61 return &bytes_->data().front(); | 61 return &bytes_->data().front(); |
62 } | 62 } |
63 virtual void Unmap() OVERRIDE { mapped_ = false; } | 63 virtual void Unmap() override { mapped_ = false; } |
64 virtual bool IsMapped() const OVERRIDE { return mapped_; } | 64 virtual bool IsMapped() const override { return mapped_; } |
65 virtual uint32 GetStride() const OVERRIDE { | 65 virtual uint32 GetStride() const override { |
66 return size_.width() * BytesPerPixel(internalformat_); | 66 return size_.width() * BytesPerPixel(internalformat_); |
67 } | 67 } |
68 virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE { | 68 virtual gfx::GpuMemoryBufferHandle GetHandle() const override { |
69 NOTREACHED(); | 69 NOTREACHED(); |
70 return gfx::GpuMemoryBufferHandle(); | 70 return gfx::GpuMemoryBufferHandle(); |
71 } | 71 } |
72 | 72 |
73 private: | 73 private: |
74 scoped_refptr<base::RefCountedBytes> bytes_; | 74 scoped_refptr<base::RefCountedBytes> bytes_; |
75 const gfx::Size size_; | 75 const gfx::Size size_; |
76 unsigned internalformat_; | 76 unsigned internalformat_; |
77 bool mapped_; | 77 bool mapped_; |
78 }; | 78 }; |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 void GLManager::SetSurfaceVisible(bool visible) { | 382 void GLManager::SetSurfaceVisible(bool visible) { |
383 NOTIMPLEMENTED(); | 383 NOTIMPLEMENTED(); |
384 } | 384 } |
385 | 385 |
386 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { | 386 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { |
387 NOTIMPLEMENTED(); | 387 NOTIMPLEMENTED(); |
388 return 0; | 388 return 0; |
389 } | 389 } |
390 | 390 |
391 } // namespace gpu | 391 } // namespace gpu |
OLD | NEW |