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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 2895273002: Unified the use of BufferToTextureTargetMap for all the Processes (Closed)
Patch Set: nit taken care Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index fff5edb377455b6abe81f8e9a36ca5d764c3e107..3f45c5efc737365c316c9e7e1ad1bd4dda948fee 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -31,6 +31,7 @@
#include "cc/base/switches.h"
#include "cc/input/input_handler.h"
#include "cc/layers/layer.h"
+#include "cc/output/buffer_to_texture_target_map.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/context_provider.h"
#include "cc/output/output_surface.h"
@@ -529,6 +530,18 @@ void CompositorImpl::CreateLayerTreeHost() {
settings.single_thread_proxy_scheduler = true;
animation_host_ = cc::AnimationHost::CreateMainInstance();
+ for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST);
boliu 2017/06/07 23:14:48 I think this code to generate a map from gpu::GetI
sujith 2017/06/08 10:40:30 yes currently its been generated in 3 different pl
boliu 2017/06/08 17:00:00 Add a method to content/browser/gpu/compositor_uti
+ ++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);
+ settings.buffer_to_texture_target_map[std::make_pair(usage, format)] =
boliu 2017/06/07 23:14:48 you need a rebase I think, this setting moved into
sujith 2017/06/08 10:40:30 i have rebased the current patch based on the late
+ target;
+ }
+ }
cc::LayerTreeHost::InitParams params;
params.client = this;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698