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 "content/browser/gpu/compositor_util.h" | 5 #include "content/browser/gpu/compositor_util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 problem_list->Append(std::move(problem)); | 395 problem_list->Append(std::move(problem)); |
396 } | 396 } |
397 } | 397 } |
398 return problem_list; | 398 return problem_list; |
399 } | 399 } |
400 | 400 |
401 std::vector<std::string> GetDriverBugWorkarounds() { | 401 std::vector<std::string> GetDriverBugWorkarounds() { |
402 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 402 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
403 } | 403 } |
404 | 404 |
| 405 cc::BufferToTextureTargetMap CreateBufferToTextureTargetMap() { |
| 406 cc::BufferToTextureTargetMap image_targets; |
| 407 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); |
| 408 ++usage_idx) { |
| 409 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); |
| 410 for (int format_idx = 0; |
| 411 format_idx <= static_cast<int>(gfx::BufferFormat::LAST); |
| 412 ++format_idx) { |
| 413 gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx); |
| 414 uint32_t target = gpu::GetImageTextureTarget(format, usage); |
| 415 image_targets[std::make_pair(usage, format)] = target; |
| 416 } |
| 417 } |
| 418 return image_targets; |
| 419 } |
| 420 |
405 } // namespace content | 421 } // namespace content |
OLD | NEW |