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

Unified Diff: cc/layers/tiled_layer_impl.cc

Issue 633773004: cc: Pass Occlusion instead of OcclusionTracker to LayerImpls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 2 months 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/layers/tiled_layer_impl.h ('k') | cc/layers/tiled_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/tiled_layer_impl.cc
diff --git a/cc/layers/tiled_layer_impl.cc b/cc/layers/tiled_layer_impl.cc
index 18d9d1ebf9fec6de57ebd29bb90bff0aa85c0186..5a0e81d5fd7078499bbca24b234df1daa6e2a26f 100644
--- a/cc/layers/tiled_layer_impl.cc
+++ b/cc/layers/tiled_layer_impl.cc
@@ -16,7 +16,7 @@
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/tile_draw_quad.h"
#include "cc/resources/layer_tiling_data.h"
-#include "cc/trees/occlusion_tracker.h"
+#include "cc/trees/occlusion.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/quad_f.h"
@@ -155,10 +155,9 @@ bool TiledLayerImpl::WillDraw(DrawMode draw_mode,
return LayerImpl::WillDraw(draw_mode, resource_provider);
}
-void TiledLayerImpl::AppendQuads(
- RenderPass* render_pass,
- const OcclusionTracker<LayerImpl>& occlusion_tracker,
- AppendQuadsData* append_quads_data) {
+void TiledLayerImpl::AppendQuads(RenderPass* render_pass,
+ const Occlusion& occlusion_in_content_space,
+ AppendQuadsData* append_quads_data) {
DCHECK(tiler_);
DCHECK(!tiler_->has_empty_bounds());
DCHECK(!visible_content_rect().IsEmpty());
@@ -204,8 +203,6 @@ void TiledLayerImpl::AppendQuads(
if (skips_draw_)
return;
- Occlusion occlusion =
- occlusion_tracker.GetCurrentOcclusionForLayer(draw_transform());
for (int j = top; j <= bottom; ++j) {
for (int i = left; i <= right; ++i) {
DrawableTile* tile = TileAt(i, j);
@@ -218,7 +215,7 @@ void TiledLayerImpl::AppendQuads(
continue;
gfx::Rect visible_tile_rect =
- occlusion.GetUnoccludedContentRect(tile_rect);
+ occlusion_in_content_space.GetUnoccludedContentRect(tile_rect);
if (visible_tile_rect.IsEmpty())
continue;
« no previous file with comments | « cc/layers/tiled_layer_impl.h ('k') | cc/layers/tiled_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698