diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 07:02:15 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 07:02:15 +0000 |
commit | f57bbc063aa387dbd7c929cacc8d55a960a28ec4 (patch) | |
tree | efdd404c8ee8be1d32a92d4c1c1dfd8e65ba89a9 /cc/gl_renderer.cc | |
parent | 493227ba58e115567c5eab085250beec83e03038 (diff) | |
download | chromium_src-f57bbc063aa387dbd7c929cacc8d55a960a28ec4.zip chromium_src-f57bbc063aa387dbd7c929cacc8d55a960a28ec4.tar.gz chromium_src-f57bbc063aa387dbd7c929cacc8d55a960a28ec4.tar.bz2 |
cc: Make RenderPass into a struct-like class.
This follows the same pattern as DrawQuad and SharedQuadState. The Create()
method takes no parameters, allowing the IPC code to create an empty RenderPass.
Then we have SetNew() and SetAll() methods to set the the properties of the
RenderPass when creating a new one, or when recreating one via IPC,
respectively.
Covered by existing tests.
BUG=152337
TBR=aelias
Review URL: https://chromiumcodereview.appspot.com/11413106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168998 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/gl_renderer.cc')
-rw-r--r-- | cc/gl_renderer.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc index e4e8034..850b8c2 100644 --- a/cc/gl_renderer.cc +++ b/cc/gl_renderer.cc @@ -201,13 +201,13 @@ void GLRenderer::viewportChanged() void GLRenderer::clearFramebuffer(DrawingFrame& frame) { // On DEBUG builds, opaque render passes are cleared to blue to easily see regions that were not drawn on the screen. - if (frame.currentRenderPass->hasTransparentBackground()) + if (frame.currentRenderPass->has_transparent_background) GLC(m_context, m_context->clearColor(0, 0, 0, 0)); else GLC(m_context, m_context->clearColor(0, 0, 1, 1)); #ifdef NDEBUG - if (frame.currentRenderPass->hasTransparentBackground()) + if (frame.currentRenderPass->has_transparent_background) #endif m_context->clear(GL_COLOR_BUFFER_BIT); } @@ -455,7 +455,7 @@ scoped_ptr<ScopedResource> GLRenderer::drawBackgroundFilters( // FIXME: We only allow background filters on an opaque render surface because other surfaces may contain // translucent pixels, and the contents behind those translucent pixels wouldn't have the filter applied. - if (frame.currentRenderPass->hasTransparentBackground()) + if (frame.currentRenderPass->has_transparent_background) return scoped_ptr<ScopedResource>(); DCHECK(!frame.currentTexture); @@ -466,7 +466,7 @@ scoped_ptr<ScopedResource> GLRenderer::drawBackgroundFilters( filters.getOutsets(top, right, bottom, left); deviceRect.Inset(-left, -top, -right, -bottom); - deviceRect.Intersect(frame.currentRenderPass->outputRect()); + deviceRect.Intersect(frame.currentRenderPass->output_rect); scoped_ptr<ScopedResource> deviceBackgroundTexture = ScopedResource::create(m_resourceProvider); if (!getFramebufferTexture(deviceBackgroundTexture.get(), deviceRect)) @@ -523,16 +523,16 @@ void GLRenderer::drawRenderPassQuad(DrawingFrame& frame, const RenderPassDrawQua WebTransformationMatrix contentsDeviceTransformInverse = contentsDeviceTransform.inverse(); scoped_ptr<ScopedResource> backgroundTexture = drawBackgroundFilters( - frame, quad, renderPass->backgroundFilters(), + frame, quad, renderPass->background_filters, contentsDeviceTransform, contentsDeviceTransformInverse); // FIXME: Cache this value so that we don't have to do it for both the surface and its replica. // Apply filters to the contents texture. SkBitmap filterBitmap; - if (renderPass->filter()) { - filterBitmap = applyImageFilter(this, renderPass->filter(), contentsTexture, m_client->hasImplThread()); + if (renderPass->filter) { + filterBitmap = applyImageFilter(this, renderPass->filter, contentsTexture, m_client->hasImplThread()); } else { - filterBitmap = applyFilters(this, renderPass->filters(), contentsTexture, m_client->hasImplThread()); + filterBitmap = applyFilters(this, renderPass->filters, contentsTexture, m_client->hasImplThread()); } scoped_ptr<ResourceProvider::ScopedReadLockGL> contentsResourceLock; unsigned contentsTextureId = 0; |