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