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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deprecate GLenum format throughout cc Created 7 years, 3 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #if defined(OS_ANDROID)
11 #include "base/android/sys_utils.h"
12 #endif
13
10 #include "base/command_line.h" 14 #include "base/command_line.h"
11 #include "base/logging.h" 15 #include "base/logging.h"
12 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
13 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
14 #include "base/time/time.h" 18 #include "base/time/time.h"
15 #include "cc/base/switches.h" 19 #include "cc/base/switches.h"
16 #include "cc/debug/layer_tree_debug_state.h" 20 #include "cc/debug/layer_tree_debug_state.h"
17 #include "cc/layers/layer.h" 21 #include "cc/layers/layer.h"
18 #include "cc/trees/layer_tree_host.h" 22 #include "cc/trees/layer_tree_host.h"
19 #include "content/common/gpu/client/context_provider_command_buffer.h" 23 #include "content/common/gpu/client/context_provider_command_buffer.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 settings.solid_color_scrollbars = true; 274 settings.solid_color_scrollbars = true;
271 settings.solid_color_scrollbar_color = 275 settings.solid_color_scrollbar_color =
272 cmd->HasSwitch(switches::kHideScrollbars) 276 cmd->HasSwitch(switches::kHideScrollbars)
273 ? SK_ColorTRANSPARENT 277 ? SK_ColorTRANSPARENT
274 : SkColorSetARGB(128, 128, 128, 128); 278 : SkColorSetARGB(128, 128, 128, 128);
275 settings.solid_color_scrollbar_thickness_dip = 3; 279 settings.solid_color_scrollbar_thickness_dip = 3;
276 settings.highp_threshold_min = 2048; 280 settings.highp_threshold_min = 2048;
277 // Android WebView handles root layer flings itself. 281 // Android WebView handles root layer flings itself.
278 settings.ignore_root_layer_flings = 282 settings.ignore_root_layer_flings =
279 widget->UsingSynchronousRendererCompositor(); 283 widget->UsingSynchronousRendererCompositor();
284 settings.use_rgba_4444_textures =
285 base::android::SysUtils::IsLowEndDevice();
280 #elif !defined(OS_MACOSX) 286 #elif !defined(OS_MACOSX)
281 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { 287 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) {
282 settings.scrollbar_animator = cc::LayerTreeSettings::LinearFade; 288 settings.scrollbar_animator = cc::LayerTreeSettings::LinearFade;
283 settings.solid_color_scrollbars = true; 289 settings.solid_color_scrollbars = true;
284 } 290 }
285 if (cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport) || 291 if (cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport) ||
286 cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { 292 cmd->HasSwitch(switches::kEnableOverlayScrollbars)) {
287 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); 293 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128);
288 settings.solid_color_scrollbar_thickness_dip = 7; 294 settings.solid_color_scrollbar_thickness_dip = 7;
289 } 295 }
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 600 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
595 } 601 }
596 602
597 scoped_refptr<cc::ContextProvider> 603 scoped_refptr<cc::ContextProvider>
598 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 604 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
599 return RenderThreadImpl::current()-> 605 return RenderThreadImpl::current()->
600 OffscreenContextProviderForCompositorThread(); 606 OffscreenContextProviderForCompositorThread();
601 } 607 }
602 608
603 } // namespace content 609 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698