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

Unified Diff: cc/resources/tile_manager.h

Issue 15995033: cc: Low quality support for low res tiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index d22b78e4b3c592dfeeee8b2d592018a3f014e6b0..862382024f0ed5b925c04f7a11df7fa04e65f504 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -24,6 +24,17 @@ class ResourceProvider;
class Tile;
class TileVersion;
+// Low quality implies no lcd test;
+// high quality implies lcd text.
+// Note that the order of these matters, from "better" to "worse" in terms of
+// quality.
+enum TileRasterMode {
+ HIGH_QUALITY_RASTER_MODE = 0,
+ HIGH_QUALITY_NO_LCD_RASTER_MODE = 1,
+ LOW_QUALITY_RASTER_MODE = 2,
+ NUM_RASTER_MODES = 3
+};
+
class CC_EXPORT TileManagerClient {
public:
virtual void ScheduleManageTiles() = 0;
@@ -124,12 +135,16 @@ class CC_EXPORT TileManager {
int layer_id;
const void* tile_id;
int source_frame_number;
+ TileRasterMode raster_mode;
};
void AssignBinsToTiles();
void SortTiles();
+ TileRasterMode DetermineRasterMode(const Tile* tile) const;
void AssignGpuMemoryToTiles();
+ void FreeResourceForTile(Tile* tile, TileRasterMode mode);
void FreeResourcesForTile(Tile* tile);
+ void FreeUnusedResourcesForTile(Tile* tile);
void ScheduleManageTiles() {
if (manage_tiles_pending_)
return;
@@ -149,6 +164,7 @@ class CC_EXPORT TileManager {
scoped_refptr<Tile> tile,
scoped_ptr<ResourcePool::Resource> resource,
PicturePileImpl::Analysis* analysis,
+ TileRasterMode raster_mode,
bool was_canceled);
void DidFinishTileInitialization(Tile* tile);
void DidTileTreeBinChange(Tile* tile,
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698