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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2784683002: cc: remove the veto-to-software for complex content. (Closed)
Patch Set: Remove GpuRasterizationStatus::OFF_CONTENT entirely. Created 3 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 gpu_rasterization_status_ = GpuRasterizationStatus::ON_FORCED; 1815 gpu_rasterization_status_ = GpuRasterizationStatus::ON_FORCED;
1816 use_msaa = !content_is_suitable_for_gpu_rasterization_ && 1816 use_msaa = !content_is_suitable_for_gpu_rasterization_ &&
1817 using_msaa_for_complex_content; 1817 using_msaa_for_complex_content;
1818 if (use_msaa) { 1818 if (use_msaa) {
1819 gpu_rasterization_status_ = GpuRasterizationStatus::MSAA_CONTENT; 1819 gpu_rasterization_status_ = GpuRasterizationStatus::MSAA_CONTENT;
1820 } 1820 }
1821 } else if (!gpu_rasterization_enabled) { 1821 } else if (!gpu_rasterization_enabled) {
1822 gpu_rasterization_status_ = GpuRasterizationStatus::OFF_DEVICE; 1822 gpu_rasterization_status_ = GpuRasterizationStatus::OFF_DEVICE;
1823 } else if (!has_gpu_rasterization_trigger_) { 1823 } else if (!has_gpu_rasterization_trigger_) {
1824 gpu_rasterization_status_ = GpuRasterizationStatus::OFF_VIEWPORT; 1824 gpu_rasterization_status_ = GpuRasterizationStatus::OFF_VIEWPORT;
1825 } else if (content_is_suitable_for_gpu_rasterization_) { 1825 } else if (!content_is_suitable_for_gpu_rasterization_ &&
enne (OOO) 2017/04/05 22:20:09 Sorry to bikeshed, but maybe this should be called
1826 use_gpu = true; 1826 using_msaa_for_complex_content) {
1827 gpu_rasterization_status_ = GpuRasterizationStatus::ON;
1828 } else if (using_msaa_for_complex_content) {
1829 use_gpu = use_msaa = true; 1827 use_gpu = use_msaa = true;
1830 gpu_rasterization_status_ = GpuRasterizationStatus::MSAA_CONTENT; 1828 gpu_rasterization_status_ = GpuRasterizationStatus::MSAA_CONTENT;
1831 } else { 1829 } else {
1832 gpu_rasterization_status_ = GpuRasterizationStatus::OFF_CONTENT; 1830 use_gpu = true;
1831 gpu_rasterization_status_ = GpuRasterizationStatus::ON;
1833 } 1832 }
1834 1833
1835 if (use_gpu && !use_gpu_rasterization_) { 1834 if (use_gpu && !use_gpu_rasterization_) {
1836 if (!CanUseGpuRasterization()) { 1835 if (!CanUseGpuRasterization()) {
1837 // If GPU rasterization is unusable, e.g. if GlContext could not 1836 // If GPU rasterization is unusable, e.g. if GlContext could not
1838 // be created due to losing the GL context, force use of software 1837 // be created due to losing the GL context, force use of software
1839 // raster. 1838 // raster.
1840 use_gpu = false; 1839 use_gpu = false;
1841 use_msaa = false; 1840 use_msaa = false;
1842 gpu_rasterization_status_ = GpuRasterizationStatus::OFF_DEVICE; 1841 gpu_rasterization_status_ = GpuRasterizationStatus::OFF_DEVICE;
(...skipping 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after
4275 worker_context_visibility_ = 4274 worker_context_visibility_ =
4276 worker_context->CacheController()->ClientBecameVisible(); 4275 worker_context->CacheController()->ClientBecameVisible();
4277 } else { 4276 } else {
4278 worker_context->CacheController()->ClientBecameNotVisible( 4277 worker_context->CacheController()->ClientBecameNotVisible(
4279 std::move(worker_context_visibility_)); 4278 std::move(worker_context_visibility_));
4280 } 4279 }
4281 } 4280 }
4282 } 4281 }
4283 4282
4284 } // namespace cc 4283 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698