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

Side by Side Diff: cc/test/fake_picture_layer_tiling_client.cc

Issue 2175553002: Raster PictureLayerTiling with fractional translation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up Created 4 years, 3 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
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/test/fake_picture_layer_tiling_client.h" 5 #include "cc/test/fake_picture_layer_tiling_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const Region* FakePictureLayerTilingClient::GetPendingInvalidation() { 58 const Region* FakePictureLayerTilingClient::GetPendingInvalidation() {
59 return &invalidation_; 59 return &invalidation_;
60 } 60 }
61 61
62 const PictureLayerTiling* 62 const PictureLayerTiling*
63 FakePictureLayerTilingClient::GetPendingOrActiveTwinTiling( 63 FakePictureLayerTilingClient::GetPendingOrActiveTwinTiling(
64 const PictureLayerTiling* tiling) const { 64 const PictureLayerTiling* tiling) const {
65 if (!twin_set_) 65 if (!twin_set_)
66 return twin_tiling_; 66 return twin_tiling_;
67 for (size_t i = 0; i < twin_set_->num_tilings(); ++i) { 67 for (size_t i = 0; i < twin_set_->num_tilings(); ++i) {
68 if (twin_set_->tiling_at(i)->contents_scale() == tiling->contents_scale()) 68 if (twin_set_->tiling_at(i)->contents_transform() ==
69 tiling->contents_transform())
69 return twin_set_->tiling_at(i); 70 return twin_set_->tiling_at(i);
70 } 71 }
71 return nullptr; 72 return nullptr;
72 } 73 }
73 74
74 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { 75 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const {
75 return false; 76 return false;
76 } 77 }
77 78
78 } // namespace cc 79 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698