Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: content/browser/gpu/compositor_util.cc

Issue 2895273002: Unified the use of BufferToTextureTargetMap for all the Processes (Closed)
Patch Set: nit taken care Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/browser/gpu/compositor_util.h ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698