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

Side by Side Diff: cc/resources/picture_pile_base.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/resources/picture_pile.cc ('k') | cc/resources/picture_pile_impl.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/picture_pile_base.h" 5 #include "cc/resources/picture_pile_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (new_buffer_pixels == buffer_pixels()) 123 if (new_buffer_pixels == buffer_pixels())
124 return; 124 return;
125 125
126 Clear(); 126 Clear();
127 tiling_.SetBorderTexels(new_buffer_pixels); 127 tiling_.SetBorderTexels(new_buffer_pixels);
128 } 128 }
129 129
130 void PicturePileBase::Clear() { 130 void PicturePileBase::Clear() {
131 picture_map_.clear(); 131 picture_map_.clear();
132 recorded_viewport_ = gfx::Rect(); 132 recorded_viewport_ = gfx::Rect();
133 has_any_recordings_ = false;
134 is_solid_color_ = false;
133 } 135 }
134 136
135 bool PicturePileBase::HasRecordingAt(int x, int y) { 137 bool PicturePileBase::HasRecordingAt(int x, int y) {
136 PictureMap::const_iterator found = picture_map_.find(PictureMapKey(x, y)); 138 PictureMap::const_iterator found = picture_map_.find(PictureMapKey(x, y));
137 if (found == picture_map_.end()) 139 if (found == picture_map_.end())
138 return false; 140 return false;
139 return !!found->second.GetPicture(); 141 return !!found->second.GetPicture();
140 } 142 }
141 143
142 bool PicturePileBase::CanRaster(float contents_scale, 144 bool PicturePileBase::CanRaster(float contents_scale,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 const Picture* PicturePileBase::PictureInfo::GetPicture() const { 248 const Picture* PicturePileBase::PictureInfo::GetPicture() const {
247 return picture_.get(); 249 return picture_.get();
248 } 250 }
249 251
250 float PicturePileBase::PictureInfo::GetInvalidationFrequency() const { 252 float PicturePileBase::PictureInfo::GetInvalidationFrequency() const {
251 return invalidation_history_.count() / 253 return invalidation_history_.count() /
252 static_cast<float>(INVALIDATION_FRAMES_TRACKED); 254 static_cast<float>(INVALIDATION_FRAMES_TRACKED);
253 } 255 }
254 256
255 } // namespace cc 257 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile.cc ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698