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

Side by Side Diff: cc/resources/managed_tile_state.h

Issue 15995033: cc: Low quality support for low res tiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/resources/managed_tile_state.cc » ('j') | cc/resources/tile_manager.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CC_RESOURCES_MANAGED_TILE_STATE_H_ 5 #ifndef CC_RESOURCES_MANAGED_TILE_STATE_H_
6 #define CC_RESOURCES_MANAGED_TILE_STATE_H_ 6 #define CC_RESOURCES_MANAGED_TILE_STATE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/resources/platform_color.h" 9 #include "cc/resources/platform_color.h"
10 #include "cc/resources/raster_worker_pool.h" 10 #include "cc/resources/raster_worker_pool.h"
11 #include "cc/resources/resource_pool.h" 11 #include "cc/resources/resource_pool.h"
12 #include "cc/resources/resource_provider.h" 12 #include "cc/resources/resource_provider.h"
13 #include "cc/resources/tile_manager.h" 13 #include "cc/resources/tile_manager.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 enum TileRasterFlags {
18 INVALID_RASTER_FLAG = 1 << 0,
19 USE_LCD_TEXT = 1 << 1,
20 USE_HIGH_QUALITY = 1 << 2
21 };
22
17 // This is state that is specific to a tile that is 23 // This is state that is specific to a tile that is
18 // managed by the TileManager. 24 // managed by the TileManager.
19 class CC_EXPORT ManagedTileState { 25 class CC_EXPORT ManagedTileState {
20 public: 26 public:
21 class CC_EXPORT TileVersion { 27 class CC_EXPORT TileVersion {
22 public: 28 public:
23 enum Mode { 29 enum Mode {
24 RESOURCE_MODE, 30 RESOURCE_MODE,
25 SOLID_COLOR_MODE, 31 SOLID_COLOR_MODE,
26 PICTURE_PILE_MODE, 32 PICTURE_PILE_MODE,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 Mode mode_; 104 Mode mode_;
99 SkColor solid_color_; 105 SkColor solid_color_;
100 106
101 // TODO(reveman): Eliminate the need for both |resource_id_| 107 // TODO(reveman): Eliminate the need for both |resource_id_|
102 // and |resource| by re-factoring the "force upload" 108 // and |resource| by re-factoring the "force upload"
103 // mechanism. crbug.com/245767 109 // mechanism. crbug.com/245767
104 ResourceProvider::ResourceId resource_id_; 110 ResourceProvider::ResourceId resource_id_;
105 scoped_ptr<ResourcePool::Resource> resource_; 111 scoped_ptr<ResourcePool::Resource> resource_;
106 GLenum resource_format_; 112 GLenum resource_format_;
107 bool forced_upload_; 113 bool forced_upload_;
114 unsigned raster_flags_;
108 }; 115 };
109 116
110 117
111 ManagedTileState(); 118 ManagedTileState();
112 ~ManagedTileState(); 119 ~ManagedTileState();
113 120
114 scoped_ptr<base::Value> AsValue() const; 121 scoped_ptr<base::Value> AsValue() const;
115 122
116 // Persisted state: valid all the time. 123 // Persisted state: valid all the time.
117 TileVersion tile_version; 124 TileVersion tile_version;
(...skipping 20 matching lines...) Expand all
138 TileManagerBin gpu_memmgr_stats_bin; 145 TileManagerBin gpu_memmgr_stats_bin;
139 TileResolution resolution; 146 TileResolution resolution;
140 bool required_for_activation; 147 bool required_for_activation;
141 float time_to_needed_in_seconds; 148 float time_to_needed_in_seconds;
142 float distance_to_visible_in_pixels; 149 float distance_to_visible_in_pixels;
143 }; 150 };
144 151
145 } // namespace cc 152 } // namespace cc
146 153
147 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ 154 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/managed_tile_state.cc » ('j') | cc/resources/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698