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

Unified Diff: cc/layers/solid_color_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/solid_color_layer_impl.h ('k') | cc/layers/solid_color_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/solid_color_layer_impl.cc
diff --git a/cc/layers/solid_color_layer_impl.cc b/cc/layers/solid_color_layer_impl.cc
index 618ea5350720561d4ad7e7d0d9633f5cce5318b9..c8ddc7d7df85e2b820a714b47084fe7cd24d428a 100644
--- a/cc/layers/solid_color_layer_impl.cc
+++ b/cc/layers/solid_color_layer_impl.cc
@@ -8,7 +8,7 @@
#include "cc/layers/append_quads_data.h"
#include "cc/quads/solid_color_draw_quad.h"
-#include "cc/trees/occlusion_tracker.h"
+#include "cc/trees/occlusion.h"
namespace cc {
@@ -29,15 +29,11 @@ scoped_ptr<LayerImpl> SolidColorLayerImpl::CreateLayerImpl(
void SolidColorLayerImpl::AppendSolidQuads(
RenderPass* render_pass,
- const OcclusionTracker<LayerImpl>& occlusion_tracker,
+ const Occlusion& occlusion_in_content_space,
SharedQuadState* shared_quad_state,
const gfx::Size& content_bounds,
- const gfx::Transform& target_space_transform,
SkColor color,
AppendQuadsData* append_quads_data) {
- Occlusion occlusion =
- occlusion_tracker.GetCurrentOcclusionForLayer(target_space_transform);
-
// We create a series of smaller quads instead of just one large one so that
// the culler can reduce the total pixels drawn.
int width = content_bounds.width();
@@ -49,7 +45,7 @@ void SolidColorLayerImpl::AppendSolidQuads(
std::min(width - x, kSolidQuadTileSize),
std::min(height - y, kSolidQuadTileSize));
gfx::Rect visible_quad_rect =
- occlusion.GetUnoccludedContentRect(quad_rect);
+ occlusion_in_content_space.GetUnoccludedContentRect(quad_rect);
if (visible_quad_rect.IsEmpty())
continue;
@@ -66,7 +62,7 @@ void SolidColorLayerImpl::AppendSolidQuads(
void SolidColorLayerImpl::AppendQuads(
RenderPass* render_pass,
- const OcclusionTracker<LayerImpl>& occlusion_tracker,
+ const Occlusion& occlusion_in_content_space,
AppendQuadsData* append_quads_data) {
SharedQuadState* shared_quad_state =
render_pass->CreateAndAppendSharedQuadState();
@@ -76,10 +72,9 @@ void SolidColorLayerImpl::AppendQuads(
render_pass, content_bounds(), shared_quad_state, append_quads_data);
AppendSolidQuads(render_pass,
- occlusion_tracker,
+ occlusion_in_content_space,
shared_quad_state,
content_bounds(),
- draw_properties().target_space_transform,
background_color(),
append_quads_data);
}
« no previous file with comments | « cc/layers/solid_color_layer_impl.h ('k') | cc/layers/solid_color_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698