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

Side by Side Diff: cc/quad_culler.cc

Issue 11529003: [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 | « cc/picture_layer_impl.cc ('k') | cc/render_surface_impl.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/quad_culler.h" 5 #include "cc/quad_culler.h"
6 6
7 #include "cc/append_quads_data.h" 7 #include "cc/append_quads_data.h"
8 #include "cc/debug_border_draw_quad.h" 8 #include "cc/debug_border_draw_quad.h"
9 #include "cc/debug_colors.h" 9 #include "cc/debug_colors.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 if (keepQuad) 43 if (keepQuad)
44 drawQuad->visible_rect = culledRect; 44 drawQuad->visible_rect = culledRect;
45 45
46 occlusionTracker.overdrawMetrics().didCullForDrawing(drawQuad->quadTransform (), drawQuad->rect, culledRect); 46 occlusionTracker.overdrawMetrics().didCullForDrawing(drawQuad->quadTransform (), drawQuad->rect, culledRect);
47 gfx::Rect opaqueDrawRect = drawQuad->opacity() == 1.0f ? drawQuad->opaque_re ct : gfx::Rect(); 47 gfx::Rect opaqueDrawRect = drawQuad->opacity() == 1.0f ? drawQuad->opaque_re ct : gfx::Rect();
48 occlusionTracker.overdrawMetrics().didDraw(drawQuad->quadTransform(), culled Rect, opaqueDrawRect); 48 occlusionTracker.overdrawMetrics().didDraw(drawQuad->quadTransform(), culled Rect, opaqueDrawRect);
49 49
50 if (keepQuad) { 50 if (keepQuad) {
51 if (createDebugBorderQuads && !drawQuad->IsDebugQuad() && drawQuad->visi ble_rect != drawQuad->rect) { 51 if (createDebugBorderQuads && !drawQuad->IsDebugQuad() && drawQuad->visi ble_rect != drawQuad->rect) {
52 SkColor color = DebugColors::CulledTileBorderColor(); 52 SkColor color = DebugColors::CulledTileBorderColor();
53 float width = DebugColors::CulledTileBorderWidth(layer ? layer->laye rTreeHostImpl() : NULL); 53 float width = DebugColors::CulledTileBorderWidth(layer ? layer->laye rTreeImpl() : NULL);
54 scoped_ptr<DebugBorderDrawQuad> debugBorderQuad = DebugBorderDrawQua d::Create(); 54 scoped_ptr<DebugBorderDrawQuad> debugBorderQuad = DebugBorderDrawQua d::Create();
55 debugBorderQuad->SetNew(drawQuad->shared_quad_state, drawQuad->visib le_rect, color, width); 55 debugBorderQuad->SetNew(drawQuad->shared_quad_state, drawQuad->visib le_rect, color, width);
56 quadList.append(debugBorderQuad.PassAs<DrawQuad>()); 56 quadList.append(debugBorderQuad.PassAs<DrawQuad>());
57 } 57 }
58 58
59 // Pass the quad after we're done using it. 59 // Pass the quad after we're done using it.
60 quadList.append(drawQuad.Pass()); 60 quadList.append(drawQuad.Pass());
61 } 61 }
62 return keepQuad; 62 return keepQuad;
63 } 63 }
(...skipping 12 matching lines...) Expand all
76 culledRect = m_occlusionTracker.unoccludedContributingSurfaceContentRect (m_layer, false, drawQuad->rect, &hasOcclusionFromOutsideTargetSurface); 76 culledRect = m_occlusionTracker.unoccludedContributingSurfaceContentRect (m_layer, false, drawQuad->rect, &hasOcclusionFromOutsideTargetSurface);
77 else 77 else
78 culledRect = m_occlusionTracker.unoccludedContentRect(m_layer->renderTar get(), drawQuad->rect, drawQuad->quadTransform(), implDrawTransformIsUnknown, dr awQuad->clippedRectInTarget(), &hasOcclusionFromOutsideTargetSurface); 78 culledRect = m_occlusionTracker.unoccludedContentRect(m_layer->renderTar get(), drawQuad->rect, drawQuad->quadTransform(), implDrawTransformIsUnknown, dr awQuad->clippedRectInTarget(), &hasOcclusionFromOutsideTargetSurface);
79 79
80 appendQuadsData.hadOcclusionFromOutsideTargetSurface |= hasOcclusionFromOuts ideTargetSurface; 80 appendQuadsData.hadOcclusionFromOutsideTargetSurface |= hasOcclusionFromOuts ideTargetSurface;
81 81
82 return appendQuadInternal(drawQuad.Pass(), culledRect, m_quadList, m_occlusi onTracker, m_layer, m_showCullingWithDebugBorderQuads); 82 return appendQuadInternal(drawQuad.Pass(), culledRect, m_quadList, m_occlusi onTracker, m_layer, m_showCullingWithDebugBorderQuads);
83 } 83 }
84 84
85 } // namespace cc 85 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_layer_impl.cc ('k') | cc/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698