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

Unified Diff: cc/output/renderer_settings.cc

Issue 1713503002: Reland Allow one-copy and zero-copy task tile worker pools to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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/output/renderer_settings.h ('k') | cc/output/renderer_settings_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/renderer_settings.cc
diff --git a/cc/output/renderer_settings.cc b/cc/output/renderer_settings.cc
index 133fb33789db6a8708c37fe8bd405ee01c3e131c..c0927cc77db45c8292844f8b420bdae640c20168 100644
--- a/cc/output/renderer_settings.cc
+++ b/cc/output/renderer_settings.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "cc/proto/renderer_settings.pb.h"
+#include "cc/resources/platform_color.h"
namespace cc {
@@ -22,9 +23,9 @@ RendererSettings::RendererSettings()
release_overlay_resources_on_swap_complete(false),
refresh_rate(60.0),
highp_threshold_min(0),
- use_rgba_4444_textures(false),
texture_id_allocation_chunk_size(64),
- use_gpu_memory_buffer_resources(false) {}
+ use_gpu_memory_buffer_resources(false),
+ preferred_tile_format(PlatformColor::BestTextureFormat()) {}
RendererSettings::~RendererSettings() {
}
@@ -41,9 +42,9 @@ void RendererSettings::ToProtobuf(proto::RendererSettings* proto) const {
release_overlay_resources_on_swap_complete);
proto->set_refresh_rate(refresh_rate);
proto->set_highp_threshold_min(highp_threshold_min);
- proto->set_use_rgba_4444_textures(use_rgba_4444_textures);
proto->set_texture_id_allocation_chunk_size(texture_id_allocation_chunk_size);
proto->set_use_gpu_memory_buffer_resources(use_gpu_memory_buffer_resources);
+ proto->set_preferred_tile_format(preferred_tile_format);
}
void RendererSettings::FromProtobuf(const proto::RendererSettings& proto) {
@@ -58,9 +59,13 @@ void RendererSettings::FromProtobuf(const proto::RendererSettings& proto) {
proto.release_overlay_resources_on_swap_complete();
refresh_rate = proto.refresh_rate();
highp_threshold_min = proto.highp_threshold_min();
- use_rgba_4444_textures = proto.use_rgba_4444_textures();
texture_id_allocation_chunk_size = proto.texture_id_allocation_chunk_size();
use_gpu_memory_buffer_resources = proto.use_gpu_memory_buffer_resources();
+
+ DCHECK_LE(proto.preferred_tile_format(),
+ static_cast<uint32_t>(RESOURCE_FORMAT_MAX));
+ preferred_tile_format =
+ static_cast<ResourceFormat>(proto.preferred_tile_format());
}
bool RendererSettings::operator==(const RendererSettings& other) const {
@@ -75,11 +80,11 @@ bool RendererSettings::operator==(const RendererSettings& other) const {
other.release_overlay_resources_on_swap_complete &&
refresh_rate == other.refresh_rate &&
highp_threshold_min == other.highp_threshold_min &&
- use_rgba_4444_textures == other.use_rgba_4444_textures &&
texture_id_allocation_chunk_size ==
other.texture_id_allocation_chunk_size &&
use_gpu_memory_buffer_resources ==
- other.use_gpu_memory_buffer_resources;
+ other.use_gpu_memory_buffer_resources &&
+ preferred_tile_format == other.preferred_tile_format;
}
} // namespace cc
« no previous file with comments | « cc/output/renderer_settings.h ('k') | cc/output/renderer_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698