| OLD | NEW |
| 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/resources/picture_pile.h" | 5 #include "cc/resources/picture_pile.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 if (picture->ApproximateOpCount() > kOpCountThatIsOkToAnalyze) | 563 if (picture->ApproximateOpCount() > kOpCountThatIsOkToAnalyze) |
| 564 return; | 564 return; |
| 565 | 565 |
| 566 // Make sure all of the mapped images point to the same picture. | 566 // Make sure all of the mapped images point to the same picture. |
| 567 for (++it; it != picture_map_.end(); ++it) { | 567 for (++it; it != picture_map_.end(); ++it) { |
| 568 if (it->second.GetPicture() != picture) | 568 if (it->second.GetPicture() != picture) |
| 569 return; | 569 return; |
| 570 } | 570 } |
| 571 skia::AnalysisCanvas canvas(recorded_viewport_.width(), | 571 skia::AnalysisCanvas canvas(recorded_viewport_.width(), |
| 572 recorded_viewport_.height()); | 572 recorded_viewport_.height()); |
| 573 picture->Raster(&canvas, NULL, Region(), 1.0f); | 573 canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y()); |
| 574 picture->Raster(&canvas, nullptr, Region(), 1.0f); |
| 574 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 575 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
| 575 } | 576 } |
| 576 | 577 |
| 577 } // namespace cc | 578 } // namespace cc |
| OLD | NEW |