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

Side by Side Diff: cc/layers/picture_layer.cc

Issue 183563003: cc: Clean up OcclusionTracker template parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: occlusionparams: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_unittest.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/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 #include "ui/gfx/rect_conversions.h" 10 #include "ui/gfx/rect_conversions.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 gfx::Rect rect = gfx::ToEnclosedRect(layer_rect); 74 gfx::Rect rect = gfx::ToEnclosedRect(layer_rect);
75 if (!rect.IsEmpty()) { 75 if (!rect.IsEmpty()) {
76 // Clamp invalidation to the layer bounds. 76 // Clamp invalidation to the layer bounds.
77 rect.Intersect(gfx::Rect(bounds())); 77 rect.Intersect(gfx::Rect(bounds()));
78 pending_invalidation_.Union(rect); 78 pending_invalidation_.Union(rect);
79 } 79 }
80 Layer::SetNeedsDisplayRect(layer_rect); 80 Layer::SetNeedsDisplayRect(layer_rect);
81 } 81 }
82 82
83 bool PictureLayer::Update(ResourceUpdateQueue* queue, 83 bool PictureLayer::Update(ResourceUpdateQueue* queue,
84 const OcclusionTracker* occlusion) { 84 const OcclusionTracker<Layer>* occlusion) {
85 update_source_frame_number_ = layer_tree_host()->source_frame_number(); 85 update_source_frame_number_ = layer_tree_host()->source_frame_number();
86 bool updated = Layer::Update(queue, occlusion); 86 bool updated = Layer::Update(queue, occlusion);
87 87
88 if (last_updated_visible_content_rect_ == visible_content_rect() && 88 if (last_updated_visible_content_rect_ == visible_content_rect() &&
89 pile_->size() == paint_properties().bounds && 89 pile_->size() == paint_properties().bounds &&
90 pending_invalidation_.IsEmpty()) { 90 pending_invalidation_.IsEmpty()) {
91 // Only early out if the visible content rect of this layer hasn't changed. 91 // Only early out if the visible content rect of this layer hasn't changed.
92 return updated; 92 return updated;
93 } 93 }
94 94
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 client_->PaintContents(canvas, gfx::Rect(width, height), &opaque); 154 client_->PaintContents(canvas, gfx::Rect(width, height), &opaque);
155 picture->endRecording(); 155 picture->endRecording();
156 return picture; 156 return picture;
157 } 157 }
158 158
159 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 159 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
160 benchmark->RunOnLayer(this); 160 benchmark->RunOnLayer(this);
161 } 161 }
162 162
163 } // namespace cc 163 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698