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

Unified Diff: cc/output/direct_renderer.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a signed vs. unsigned comparison in video_resource_updater.cc Created 7 years, 3 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/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index c3a4d39b333ffa9cb63a66fd870d80b4e7903d80..51ac56a1d932e68ad95daee619701438539fa876 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -168,7 +168,8 @@ void DirectRenderer::DecideRenderPassAllocationsForFrame(
const RenderPass* render_pass_in_frame = it->second;
gfx::Size required_size = RenderPassTextureSize(render_pass_in_frame);
- GLenum required_format = RenderPassTextureFormat(render_pass_in_frame);
+ ResourceFormat required_format =
+ RenderPassTextureFormat(render_pass_in_frame);
CachedResource* texture = pass_iter->second;
DCHECK(texture);
@@ -398,8 +399,8 @@ bool DirectRenderer::UseRenderPass(DrawingFrame* frame,
enlarge_pass_texture_amount_.y());
if (!texture->id() &&
!texture->Allocate(size,
- RenderPassTextureFormat(render_pass),
- ResourceProvider::TextureUsageFramebuffer))
+ ResourceProvider::TextureUsageFramebuffer,
+ RenderPassTextureFormat(render_pass)))
return false;
return BindFramebufferToTexture(frame, texture, render_pass->output_rect);
@@ -420,8 +421,9 @@ gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
}
// static
-GLenum DirectRenderer::RenderPassTextureFormat(const RenderPass* render_pass) {
- return GL_RGBA;
+ResourceFormat DirectRenderer::RenderPassTextureFormat(
+ const RenderPass* render_pass) {
+ return RGBA_8888;
}
} // namespace cc
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698