| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/gfx/mac/io_surface.h" | 5 #include "ui/gfx/mac/io_surface.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 return 2; | 52 return 2; |
| 53 case gfx::BufferFormat::ATC: | 53 case gfx::BufferFormat::ATC: |
| 54 case gfx::BufferFormat::ATCIA: | 54 case gfx::BufferFormat::ATCIA: |
| 55 case gfx::BufferFormat::DXT1: | 55 case gfx::BufferFormat::DXT1: |
| 56 case gfx::BufferFormat::DXT5: | 56 case gfx::BufferFormat::DXT5: |
| 57 case gfx::BufferFormat::ETC1: | 57 case gfx::BufferFormat::ETC1: |
| 58 case gfx::BufferFormat::BGR_565: | 58 case gfx::BufferFormat::BGR_565: |
| 59 case gfx::BufferFormat::RGBA_4444: | 59 case gfx::BufferFormat::RGBA_4444: |
| 60 case gfx::BufferFormat::RGBX_8888: | 60 case gfx::BufferFormat::RGBX_8888: |
| 61 case gfx::BufferFormat::YVU_420: | 61 case gfx::BufferFormat::YVU_420: |
| 62 case gfx::BufferFormat::YUYV_422: |
| 62 NOTREACHED(); | 63 NOTREACHED(); |
| 63 return 0; | 64 return 0; |
| 64 } | 65 } |
| 65 | 66 |
| 66 NOTREACHED(); | 67 NOTREACHED(); |
| 67 return 0; | 68 return 0; |
| 68 } | 69 } |
| 69 | 70 |
| 70 int32_t PixelFormat(gfx::BufferFormat format) { | 71 int32_t PixelFormat(gfx::BufferFormat format) { |
| 71 switch (format) { | 72 switch (format) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 84 case gfx::BufferFormat::RG_88: | 85 case gfx::BufferFormat::RG_88: |
| 85 case gfx::BufferFormat::ATC: | 86 case gfx::BufferFormat::ATC: |
| 86 case gfx::BufferFormat::ATCIA: | 87 case gfx::BufferFormat::ATCIA: |
| 87 case gfx::BufferFormat::DXT1: | 88 case gfx::BufferFormat::DXT1: |
| 88 case gfx::BufferFormat::DXT5: | 89 case gfx::BufferFormat::DXT5: |
| 89 case gfx::BufferFormat::ETC1: | 90 case gfx::BufferFormat::ETC1: |
| 90 case gfx::BufferFormat::BGR_565: | 91 case gfx::BufferFormat::BGR_565: |
| 91 case gfx::BufferFormat::RGBA_4444: | 92 case gfx::BufferFormat::RGBA_4444: |
| 92 case gfx::BufferFormat::RGBX_8888: | 93 case gfx::BufferFormat::RGBX_8888: |
| 93 case gfx::BufferFormat::YVU_420: | 94 case gfx::BufferFormat::YVU_420: |
| 95 case gfx::BufferFormat::YUYV_422: |
| 94 NOTREACHED(); | 96 NOTREACHED(); |
| 95 return 0; | 97 return 0; |
| 96 } | 98 } |
| 97 | 99 |
| 98 NOTREACHED(); | 100 NOTREACHED(); |
| 99 return 0; | 101 return 0; |
| 100 } | 102 } |
| 101 | 103 |
| 102 } // namespace | 104 } // namespace |
| 103 | 105 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // Note that nullptr is an acceptable input to IOSurfaceSetValue. | 226 // Note that nullptr is an acceptable input to IOSurfaceSetValue. |
| 225 IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc); | 227 IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc); |
| 226 } | 228 } |
| 227 | 229 |
| 228 UMA_HISTOGRAM_TIMES("GPU.IOSurface.CreateTime", | 230 UMA_HISTOGRAM_TIMES("GPU.IOSurface.CreateTime", |
| 229 base::TimeTicks::Now() - start_time); | 231 base::TimeTicks::Now() - start_time); |
| 230 return surface; | 232 return surface; |
| 231 } | 233 } |
| 232 | 234 |
| 233 } // namespace gfx | 235 } // namespace gfx |
| OLD | NEW |