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

Unified Diff: cc/output/gl_renderer.cc

Issue 2674493003: Add compositor support for half-float RGBA buffers and textures (Closed)
Patch Set: Don't enable on non-ES3 yet Created 3 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/gl_renderer.h ('k') | cc/output/software_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index e2a00ef00dce1b1a5468960401224cd67ea62792..6fd98a258007fcc0242f9791733766f1f8ff2d4b 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -429,6 +429,12 @@ bool GLRenderer::CanPartialSwap() {
return context_provider->ContextCapabilities().post_sub_buffer;
}
+ResourceFormat GLRenderer::BackbufferFormat() const {
+ // TODO(ccameron): If we are targeting high bit depth or HDR, we should use
+ // RGBA_F16 here.
+ return resource_provider_->best_texture_format();
+}
+
void GLRenderer::DidChangeVisibility() {
if (visible_) {
output_surface_->EnsureBackbuffer();
@@ -907,7 +913,7 @@ std::unique_ptr<ScopedResource> GLRenderer::GetBackdropTexture(
// CopyTexImage2D fails when called on a texture having immutable storage.
device_background_texture->Allocate(
bounding_rect.size(), ResourceProvider::TEXTURE_HINT_DEFAULT,
- resource_provider_->best_texture_format(), frame->device_color_space);
+ BackbufferFormat(), frame->device_color_space);
{
ResourceProvider::ScopedWriteLockGL lock(
resource_provider_, device_background_texture->id(), false);
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/software_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698