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

Unified Diff: content/browser/android/content_startup_flags.cc

Issue 2895273002: Unified the use of BufferToTextureTargetMap for all the Processes (Closed)
Patch Set: BufferToTextureTargetMap for Browser Process Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/content_startup_flags.cc
diff --git a/content/browser/android/content_startup_flags.cc b/content/browser/android/content_startup_flags.cc
index 4d4d4e7ebb2773c06d1d2a32c4740702e5781655..8a346cf9aaf3506b877353667a0e2d2b49ad1082 100644
--- a/content/browser/android/content_startup_flags.cc
+++ b/content/browser/android/content_startup_flags.cc
@@ -10,10 +10,13 @@
#include "base/logging.h"
#include "base/sys_info.h"
#include "cc/base/switches.h"
+#include "cc/output/buffer_to_texture_target_map.h"
#include "content/public/browser/android/compositor.h"
#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/ipc/host/gpu_memory_buffer_support.h"
#include "ui/base/ui_base_switches.h"
+#include "ui/gfx/buffer_types.h"
namespace content {
@@ -75,6 +78,22 @@ void SetContentCommandLineFlags(bool single_process,
parsed_command_line->AppendSwitchASCII(
switches::kProfilerTiming, switches::kProfilerTimingDisabledValue);
}
+
+ cc::BufferToTextureTargetMap image_targets;
+ for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST);
+ ++usage_idx) {
+ gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx);
+ for (int format_idx = 0;
+ format_idx <= static_cast<int>(gfx::BufferFormat::LAST);
+ ++format_idx) {
+ gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx);
+ uint32_t target = gpu::GetImageTextureTarget(format, usage);
+ image_targets[std::make_pair(usage, format)] = target;
+ }
+ }
+ parsed_command_line->AppendSwitchASCII(
+ switches::kBrowserContentImageTextureTarget,
+ cc::BufferToTextureTargetMapToString(image_targets));
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698