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

Unified Diff: cc/layers/painted_scrollbar_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/painted_scrollbar_layer_impl.h ('k') | cc/layers/picture_image_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/painted_scrollbar_layer_impl.cc
diff --git a/cc/layers/painted_scrollbar_layer_impl.cc b/cc/layers/painted_scrollbar_layer_impl.cc
index 180c26dd3b27f54762165d8910480360e7ae954b..b5de1e19a2ec95add54d031cd6ec46d45e59c898 100644
--- a/cc/layers/painted_scrollbar_layer_impl.cc
+++ b/cc/layers/painted_scrollbar_layer_impl.cc
@@ -12,7 +12,7 @@
#include "cc/quads/texture_draw_quad.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/layer_tree_settings.h"
-#include "cc/trees/occlusion_tracker.h"
+#include "cc/trees/occlusion.h"
#include "ui/gfx/rect_conversions.h"
namespace cc {
@@ -69,7 +69,7 @@ bool PaintedScrollbarLayerImpl::WillDraw(DrawMode draw_mode,
void PaintedScrollbarLayerImpl::AppendQuads(
RenderPass* render_pass,
- const OcclusionTracker<LayerImpl>& occlusion_tracker,
+ const Occlusion& occlusion_in_content_space,
AppendQuadsData* append_quads_data) {
bool premultipled_alpha = true;
bool flipped = false;
@@ -85,10 +85,8 @@ void PaintedScrollbarLayerImpl::AppendQuads(
render_pass, content_bounds(), shared_quad_state, append_quads_data);
gfx::Rect thumb_quad_rect = ComputeThumbQuadRect();
- Occlusion occlusion =
- occlusion_tracker.GetCurrentOcclusionForLayer(draw_transform());
gfx::Rect visible_thumb_quad_rect =
- occlusion.GetUnoccludedContentRect(thumb_quad_rect);
+ occlusion_in_content_space.GetUnoccludedContentRect(thumb_quad_rect);
ResourceProvider::ResourceId thumb_resource_id =
layer_tree_impl()->ResourceIdForUIResource(thumb_ui_resource_id_);
@@ -115,7 +113,7 @@ void PaintedScrollbarLayerImpl::AppendQuads(
gfx::Rect track_quad_rect = content_bounds_rect;
gfx::Rect visible_track_quad_rect =
- occlusion.GetUnoccludedContentRect(track_quad_rect);
+ occlusion_in_content_space.GetUnoccludedContentRect(track_quad_rect);
if (track_resource_id && !visible_track_quad_rect.IsEmpty()) {
gfx::Rect opaque_rect(contents_opaque() ? track_quad_rect : gfx::Rect());
const float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
« no previous file with comments | « cc/layers/painted_scrollbar_layer_impl.h ('k') | cc/layers/picture_image_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698