summaryrefslogtreecommitdiffstats
path: root/cc/output/direct_renderer.cc
diff options
context:
space:
mode:
authorkaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-19 05:05:14 +0000
committerkaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-19 05:05:14 +0000
commit27a41fe44f2c76b55e75d351cd3b75d0e7aabdd7 (patch)
tree74954f5cb00293c37c51f30b822ebc067aa9e81e /cc/output/direct_renderer.cc
parent16f2110ab00d1c05dc775b4a406e08525fb44c86 (diff)
downloadchromium_src-27a41fe44f2c76b55e75d351cd3b75d0e7aabdd7.zip
chromium_src-27a41fe44f2c76b55e75d351cd3b75d0e7aabdd7.tar.gz
chromium_src-27a41fe44f2c76b55e75d351cd3b75d0e7aabdd7.tar.bz2
cc: Reland r233830. "Adding support for RGBA_4444 tile textures". r223830 had a bug in async_pixel_transfer_manager_egl.cc that wasn't directly related to the 4444 support. This patch includes the rest of the files in r223830. Changes to async_pixel_transfer_manager_egl.cc have been moved to the separate patch after fixing the bug: https://codereview.chromium.org/23533067/
BUG=272539 Review URL: https://chromiumcodereview.appspot.com/23447048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/direct_renderer.cc')
-rw-r--r--cc/output/direct_renderer.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index c3a4d39..51ac56a 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