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

Unified Diff: cc/quad_culler.cc

Issue 11418047: cc: Turn DrawQuad into a struct-like class with public data members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no virtual for SetAll() 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/nine_patch_layer_impl_unittest.cc ('k') | cc/quad_culler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quad_culler.cc
diff --git a/cc/quad_culler.cc b/cc/quad_culler.cc
index b06f90b1f369f7269032cbf517f33e6c301e93b1..5ac52aefc668810a6192c45af1535733fd4fdece 100644
--- a/cc/quad_culler.cc
+++ b/cc/quad_culler.cc
@@ -43,17 +43,17 @@ static inline bool appendQuadInternal(scoped_ptr<DrawQuad> drawQuad, const gfx::
{
bool keepQuad = !culledRect.IsEmpty();
if (keepQuad)
- drawQuad->set_visible_rect(culledRect);
+ drawQuad->visible_rect = culledRect;
- occlusionTracker.overdrawMetrics().didCullForDrawing(drawQuad->quadTransform(), drawQuad->rect(), culledRect);
- gfx::Rect opaqueDrawRect = drawQuad->opacity() == 1.0f ? drawQuad->opaque_rect() : gfx::Rect();
+ occlusionTracker.overdrawMetrics().didCullForDrawing(drawQuad->quadTransform(), drawQuad->rect, culledRect);
+ gfx::Rect opaqueDrawRect = drawQuad->opacity() == 1.0f ? drawQuad->opaque_rect : gfx::Rect();
occlusionTracker.overdrawMetrics().didDraw(drawQuad->quadTransform(), culledRect, opaqueDrawRect);
if (keepQuad) {
- if (createDebugBorderQuads && !drawQuad->IsDebugQuad() && drawQuad->visible_rect() != drawQuad->rect()) {
+ if (createDebugBorderQuads && !drawQuad->IsDebugQuad() && drawQuad->visible_rect != drawQuad->rect) {
SkColor color = DebugColors::CulledTileBorderColor();
float width = DebugColors::CulledTileBorderWidth(layer ? layer->layerTreeHostImpl() : NULL);
- quadList.append(DebugBorderDrawQuad::create(drawQuad->shared_quad_state(), drawQuad->visible_rect(), color, width).PassAs<DrawQuad>());
+ quadList.append(DebugBorderDrawQuad::create(drawQuad->shared_quad_state, drawQuad->visible_rect, color, width).PassAs<DrawQuad>());
}
// Pass the quad after we're done using it.
@@ -64,7 +64,7 @@ static inline bool appendQuadInternal(scoped_ptr<DrawQuad> drawQuad, const gfx::
bool QuadCuller::append(scoped_ptr<DrawQuad> drawQuad, AppendQuadsData& appendQuadsData)
{
- DCHECK(drawQuad->shared_quad_state() == m_currentSharedQuadState);
+ DCHECK(drawQuad->shared_quad_state == m_currentSharedQuadState);
DCHECK(!m_sharedQuadStateList.isEmpty());
DCHECK(m_sharedQuadStateList.last() == m_currentSharedQuadState);
@@ -73,9 +73,9 @@ bool QuadCuller::append(scoped_ptr<DrawQuad> drawQuad, AppendQuadsData& appendQu
bool implDrawTransformIsUnknown = false;
if (m_forSurface)
- culledRect = m_occlusionTracker->unoccludedContributingSurfaceContentRect(m_layer, false, drawQuad->rect(), &hasOcclusionFromOutsideTargetSurface);
+ culledRect = m_occlusionTracker->unoccludedContributingSurfaceContentRect(m_layer, false, drawQuad->rect, &hasOcclusionFromOutsideTargetSurface);
else
- culledRect = m_occlusionTracker->unoccludedContentRect(m_layer->renderTarget(), drawQuad->rect(), drawQuad->quadTransform(), implDrawTransformIsUnknown, drawQuad->clippedRectInTarget(), &hasOcclusionFromOutsideTargetSurface);
+ culledRect = m_occlusionTracker->unoccludedContentRect(m_layer->renderTarget(), drawQuad->rect, drawQuad->quadTransform(), implDrawTransformIsUnknown, drawQuad->clippedRectInTarget(), &hasOcclusionFromOutsideTargetSurface);
appendQuadsData.hadOcclusionFromOutsideTargetSurface |= hasOcclusionFromOutsideTargetSurface;
« no previous file with comments | « cc/nine_patch_layer_impl_unittest.cc ('k') | cc/quad_culler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698