| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/test/test_image_factory.h" | 5 #include "cc/test/test_image_factory.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
| 10 #include "ui/gl/gl_image_shared_memory.h" | 10 #include "ui/gl/gl_image_shared_memory.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 scoped_refptr<gl::GLImageSharedMemory> image( | 28 scoped_refptr<gl::GLImageSharedMemory> image( |
| 29 new gl::GLImageSharedMemory(size, internalformat)); | 29 new gl::GLImageSharedMemory(size, internalformat)); |
| 30 if (!image->Initialize(handle.handle, handle.id, format, handle.offset, | 30 if (!image->Initialize(handle.handle, handle.id, format, handle.offset, |
| 31 base::checked_cast<size_t>(handle.stride))) | 31 base::checked_cast<size_t>(handle.stride))) |
| 32 return nullptr; | 32 return nullptr; |
| 33 | 33 |
| 34 return image; | 34 return image; |
| 35 } | 35 } |
| 36 | 36 |
| 37 scoped_refptr<gl::GLImage> TestImageFactory::CreateAnonymousImage( |
| 38 const gfx::Size& size, |
| 39 gfx::BufferFormat format, |
| 40 unsigned internalformat) { |
| 41 NOTIMPLEMENTED(); |
| 42 return nullptr; |
| 43 } |
| 44 |
| 37 } // namespace cc | 45 } // namespace cc |
| OLD | NEW |