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

Side by Side Diff: cc/direct_renderer.cc

Issue 11578019: Remove the pools from the ResourceProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-resolve against HEAD Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/gl_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/direct_renderer.h" 5 #include "cc/direct_renderer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 initializeMatrices(frame, renderPass->output_rect, flippedFramebuffer()) ; 270 initializeMatrices(frame, renderPass->output_rect, flippedFramebuffer()) ;
271 setDrawViewportSize(renderPass->output_rect.size()); 271 setDrawViewportSize(renderPass->output_rect.size());
272 return true; 272 return true;
273 } 273 }
274 274
275 CachedResource* texture = m_renderPassTextures.get(renderPass->id); 275 CachedResource* texture = m_renderPassTextures.get(renderPass->id);
276 DCHECK(texture); 276 DCHECK(texture);
277 277
278 gfx::Size size = renderPassTextureSize(renderPass); 278 gfx::Size size = renderPassTextureSize(renderPass);
279 size.Enlarge(m_enlargePassTextureAmount.x(), m_enlargePassTextureAmount.y()) ; 279 size.Enlarge(m_enlargePassTextureAmount.x(), m_enlargePassTextureAmount.y()) ;
280 if (!texture->id() && !texture->Allocate(Renderer::ImplPool, size, renderPas sTextureFormat(renderPass), ResourceProvider::TextureUsageFramebuffer)) 280 if (!texture->id() && !texture->Allocate(size, renderPassTextureFormat(rende rPass), ResourceProvider::TextureUsageFramebuffer))
281 return false; 281 return false;
282 282
283 return bindFramebufferToTexture(frame, texture, renderPass->output_rect); 283 return bindFramebufferToTexture(frame, texture, renderPass->output_rect);
284 } 284 }
285 285
286 bool DirectRenderer::haveCachedResourcesForRenderPassId(RenderPass::Id id) const 286 bool DirectRenderer::haveCachedResourcesForRenderPassId(RenderPass::Id id) const
287 { 287 {
288 CachedResource* texture = m_renderPassTextures.get(id); 288 CachedResource* texture = m_renderPassTextures.get(id);
289 return texture && texture->id() && texture->isComplete(); 289 return texture && texture->id() && texture->isComplete();
290 } 290 }
291 291
292 // static 292 // static
293 gfx::Size DirectRenderer::renderPassTextureSize(const RenderPass* pass) 293 gfx::Size DirectRenderer::renderPassTextureSize(const RenderPass* pass)
294 { 294 {
295 return pass->output_rect.size(); 295 return pass->output_rect.size();
296 } 296 }
297 297
298 // static 298 // static
299 GLenum DirectRenderer::renderPassTextureFormat(const RenderPass*) 299 GLenum DirectRenderer::renderPassTextureFormat(const RenderPass*)
300 { 300 {
301 return GL_RGBA; 301 return GL_RGBA;
302 } 302 }
303 303
304 } // namespace cc 304 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698