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

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

Issue 2780843002: Split image decode cache limits into "working set" vs "cache" limits (Closed)
Patch Set: comments 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.cc ('k') | cc/trees/layer_tree_settings.h » ('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.h" 5 #include "cc/trees/layer_tree_host.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 6853 matching lines...) Expand 10 before | Expand all | Expand 10 after
6864 // TODO(ericrk): We should improve this so that we can reliably detect the 6864 // TODO(ericrk): We should improve this so that we can reliably detect the
6865 // crash. 6865 // crash.
6866 class GpuRasterizationSucceedsWithLargeImage : public LayerTreeHostTest { 6866 class GpuRasterizationSucceedsWithLargeImage : public LayerTreeHostTest {
6867 protected: 6867 protected:
6868 GpuRasterizationSucceedsWithLargeImage() 6868 GpuRasterizationSucceedsWithLargeImage()
6869 : viewport_size_(1024, 2048), large_image_size_(20000, 10) {} 6869 : viewport_size_(1024, 2048), large_image_size_(20000, 10) {}
6870 6870
6871 void InitializeSettings(LayerTreeSettings* settings) override { 6871 void InitializeSettings(LayerTreeSettings* settings) override {
6872 settings->gpu_rasterization_forced = true; 6872 settings->gpu_rasterization_forced = true;
6873 6873
6874 /// Set to 0 to force at-raster GPU image decode. 6874 // Set to 0 to force at-raster GPU image decode.
6875 settings->gpu_decoded_image_budget_bytes = 0; 6875 settings->decoded_image_working_set_budget_bytes = 0;
6876 settings->decoded_image_cache_budget_bytes = 0;
6876 } 6877 }
6877 6878
6878 void SetupTree() override { 6879 void SetupTree() override {
6879 client_.set_fill_with_nonsolid_color(true); 6880 client_.set_fill_with_nonsolid_color(true);
6880 6881
6881 std::unique_ptr<FakeRecordingSource> recording = 6882 std::unique_ptr<FakeRecordingSource> recording =
6882 FakeRecordingSource::CreateFilledRecordingSource( 6883 FakeRecordingSource::CreateFilledRecordingSource(
6883 gfx::Size(10000, 10000)); 6884 gfx::Size(10000, 10000));
6884 6885
6885 recording->add_draw_image(CreateDiscardableImage(large_image_size_), 6886 recording->add_draw_image(CreateDiscardableImage(large_image_size_),
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
7185 7186
7186 private: 7187 private:
7187 bool first_ = true; 7188 bool first_ = true;
7188 SkBitmap bitmap_; 7189 SkBitmap bitmap_;
7189 }; 7190 };
7190 7191
7191 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestQueueImageDecodeNonLazy); 7192 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestQueueImageDecodeNonLazy);
7192 7193
7193 } // namespace 7194 } // namespace
7194 } // namespace cc 7195 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698