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

Side by Side Diff: cc/gl_renderer.cc

Issue 11418117: cc: Increment the ref count when assigning the SkImageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/gl_renderer.h" 5 #include "cc/gl_renderer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 WebTransformationMatrix contentsDeviceTransformInverse = contentsDeviceTrans form.inverse(); 524 WebTransformationMatrix contentsDeviceTransformInverse = contentsDeviceTrans form.inverse();
525 scoped_ptr<ScopedResource> backgroundTexture = drawBackgroundFilters( 525 scoped_ptr<ScopedResource> backgroundTexture = drawBackgroundFilters(
526 frame, quad, renderPass->background_filters, 526 frame, quad, renderPass->background_filters,
527 contentsDeviceTransform, contentsDeviceTransformInverse); 527 contentsDeviceTransform, contentsDeviceTransformInverse);
528 528
529 // FIXME: Cache this value so that we don't have to do it for both the surfa ce and its replica. 529 // FIXME: Cache this value so that we don't have to do it for both the surfa ce and its replica.
530 // Apply filters to the contents texture. 530 // Apply filters to the contents texture.
531 SkBitmap filterBitmap; 531 SkBitmap filterBitmap;
532 if (renderPass->filter) { 532 if (renderPass->filter) {
533 filterBitmap = applyImageFilter(this, renderPass->filter, contentsTextur e, m_client->hasImplThread()); 533 filterBitmap = applyImageFilter(this, renderPass->filter.get(), contents Texture, m_client->hasImplThread());
534 } else { 534 } else {
535 filterBitmap = applyFilters(this, renderPass->filters, contentsTexture, m_client->hasImplThread()); 535 filterBitmap = applyFilters(this, renderPass->filters, contentsTexture, m_client->hasImplThread());
536 } 536 }
537 scoped_ptr<ResourceProvider::ScopedReadLockGL> contentsResourceLock; 537 scoped_ptr<ResourceProvider::ScopedReadLockGL> contentsResourceLock;
538 unsigned contentsTextureId = 0; 538 unsigned contentsTextureId = 0;
539 if (filterBitmap.getTexture()) { 539 if (filterBitmap.getTexture()) {
540 GrTexture* texture = reinterpret_cast<GrTexture*>(filterBitmap.getTextur e()); 540 GrTexture* texture = reinterpret_cast<GrTexture*>(filterBitmap.getTextur e());
541 contentsTextureId = texture->getTextureHandle(); 541 contentsTextureId = texture->getTextureHandle();
542 } else { 542 } else {
543 contentsResourceLock = make_scoped_ptr(new ResourceProvider::ScopedReadL ockGL(m_resourceProvider, contentsTexture->id())); 543 contentsResourceLock = make_scoped_ptr(new ResourceProvider::ScopedReadL ockGL(m_resourceProvider, contentsTexture->id()));
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 1611
1612 releaseRenderPassTextures(); 1612 releaseRenderPassTextures();
1613 } 1613 }
1614 1614
1615 bool GLRenderer::isContextLost() 1615 bool GLRenderer::isContextLost()
1616 { 1616 {
1617 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); 1617 return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR);
1618 } 1618 }
1619 1619
1620 } // namespace cc 1620 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698