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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 14409006: cc: Changes to use GL API for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Created 7 years, 8 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
« cc/resources/resource_provider.cc ('K') | « cc/resources/resource_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 657e72f9d52b88cddb8d6b6d70697fc2ccfc2f0d..3ef83ca3a32c8f9957171d7b7eb464d2c15b226d 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/basictypes.h"
+#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/json/json_writer.h"
#include "base/metrics/histogram.h"
@@ -14,6 +15,7 @@
#include "base/stringprintf.h"
#include "cc/animation/scrollbar_animation_controller.h"
#include "cc/base/math_util.h"
+#include "cc/base/switches.h"
#include "cc/base/util.h"
#include "cc/debug/debug_rect_history.h"
#include "cc/debug/frame_rate_counter.h"
@@ -1340,6 +1342,10 @@ bool LayerTreeHostImpl::InitializeRenderer(
if (!resource_provider)
return false;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
jamesr 2013/04/25 22:50:46 I don't think this is a good way to plumb this set
kaanb1 2013/04/25 23:55:05 Done.
+ cc::switches::kUseGpuMemoryBuffers))
+ resource_provider->SetUseGpuMemoryBuffers(true);
+
if (settings_.impl_side_painting) {
tile_manager_.reset(new TileManager(this,
resource_provider.get(),
« cc/resources/resource_provider.cc ('K') | « cc/resources/resource_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698