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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
391 problem_list->Append(std::move(problem)); | 391 problem_list->Append(std::move(problem)); |
392 } | 392 } |
393 } | 393 } |
394 return problem_list; | 394 return problem_list; |
395 } | 395 } |
396 | 396 |
397 std::vector<std::string> GetDriverBugWorkarounds() { | 397 std::vector<std::string> GetDriverBugWorkarounds() { |
398 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 398 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
399 } | 399 } |
400 | 400 |
401 cc::BufferToTextureTargetMap GetBufferToTextureTargetMap() { | |
danakj
2017/06/30 16:03:23
last nit: Create rather than Get as this isn't jus
sujith
2017/07/01 12:30:13
Done.
| |
402 cc::BufferToTextureTargetMap image_targets; | |
403 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); | |
404 ++usage_idx) { | |
405 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); | |
406 for (int format_idx = 0; | |
407 format_idx <= static_cast<int>(gfx::BufferFormat::LAST); | |
408 ++format_idx) { | |
409 gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx); | |
410 uint32_t target = gpu::GetImageTextureTarget(format, usage); | |
411 image_targets[std::make_pair(usage, format)] = target; | |
412 } | |
413 } | |
414 return image_targets; | |
415 } | |
416 | |
401 } // namespace content | 417 } // namespace content |
OLD | NEW |