OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "android_webview/browser/gpu_memory_buffer_factory_impl.h" | 5 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" |
6 | 6 |
7 #include "android_webview/browser/gpu_memory_buffer_impl.h" | 7 #include "android_webview/browser/gpu_memory_buffer_impl.h" |
| 8 #include "base/logging.h" |
| 9 #include "ui/gfx/size.h" |
8 | 10 |
9 namespace android_webview { | 11 namespace android_webview { |
10 | 12 |
11 scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(gfx::Size size) { | 13 scoped_ptr<gpu::GpuMemoryBuffer> CreateGpuMemoryBuffer(int width, int height) { |
12 scoped_ptr<GpuMemoryBufferImpl> result(new GpuMemoryBufferImpl(size)); | 14 DCHECK(width > 0); |
13 return result.PassAs<gfx::GpuMemoryBuffer>(); | 15 DCHECK(height > 0); |
| 16 scoped_ptr<GpuMemoryBufferImpl> result(new GpuMemoryBufferImpl( |
| 17 gfx::Size(width, height))); |
| 18 return result.PassAs<gpu::GpuMemoryBuffer>(); |
14 } | 19 } |
15 | 20 |
16 } // namespace android_webview | 21 } // namespace android_webview |
OLD | NEW |