| 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 "ui/gl/gl_image_memory.h" | 5 #include "ui/gl/gl_image_memory.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } | 383 } |
| 384 | 384 |
| 385 gfx::Size GLImageMemory::GetSize() { | 385 gfx::Size GLImageMemory::GetSize() { |
| 386 return size_; | 386 return size_; |
| 387 } | 387 } |
| 388 | 388 |
| 389 unsigned GLImageMemory::GetInternalFormat() { | 389 unsigned GLImageMemory::GetInternalFormat() { |
| 390 return internalformat_; | 390 return internalformat_; |
| 391 } | 391 } |
| 392 | 392 |
| 393 bool GLImageMemory::BindTexImage(unsigned target) { | 393 bool GLImageMemory::BindTexImage(unsigned target, GLFence* fence) { |
| 394 return false; | 394 return false; |
| 395 } | 395 } |
| 396 | 396 |
| 397 bool GLImageMemory::CopyTexImage(unsigned target) { | 397 bool GLImageMemory::CopyTexImage(unsigned target) { |
| 398 TRACE_EVENT2("gpu", "GLImageMemory::CopyTexImage", "width", size_.width(), | 398 TRACE_EVENT2("gpu", "GLImageMemory::CopyTexImage", "width", size_.width(), |
| 399 "height", size_.height()); | 399 "height", size_.height()); |
| 400 | 400 |
| 401 // GL_TEXTURE_EXTERNAL_OES is not a supported target. | 401 // GL_TEXTURE_EXTERNAL_OES is not a supported target. |
| 402 if (target == GL_TEXTURE_EXTERNAL_OES) | 402 if (target == GL_TEXTURE_EXTERNAL_OES) |
| 403 return false; | 403 return false; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 return false; | 490 return false; |
| 491 } | 491 } |
| 492 | 492 |
| 493 // static | 493 // static |
| 494 unsigned GLImageMemory::GetInternalFormatForTesting(gfx::BufferFormat format) { | 494 unsigned GLImageMemory::GetInternalFormatForTesting(gfx::BufferFormat format) { |
| 495 DCHECK(ValidFormat(format)); | 495 DCHECK(ValidFormat(format)); |
| 496 return TextureFormat(format); | 496 return TextureFormat(format); |
| 497 } | 497 } |
| 498 | 498 |
| 499 } // namespace gl | 499 } // namespace gl |
| OLD | NEW |