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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 if (picture->ApproximateOpCount() > kOpCountThatIsOkToAnalyze) | 549 if (picture->ApproximateOpCount() > kOpCountThatIsOkToAnalyze) |
550 return; | 550 return; |
551 | 551 |
552 // Make sure all of the mapped images point to the same picture. | 552 // Make sure all of the mapped images point to the same picture. |
553 for (++it; it != picture_map_.end(); ++it) { | 553 for (++it; it != picture_map_.end(); ++it) { |
554 if (it->second.GetPicture() != picture) | 554 if (it->second.GetPicture() != picture) |
555 return; | 555 return; |
556 } | 556 } |
557 skia::AnalysisCanvas canvas(recorded_viewport_.width(), | 557 skia::AnalysisCanvas canvas(recorded_viewport_.width(), |
558 recorded_viewport_.height()); | 558 recorded_viewport_.height()); |
559 picture->Raster(&canvas, NULL, Region(), 1.0f); | 559 picture->Raster(&canvas, nullptr, Region(), 1.0f); |
560 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 560 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
561 } | 561 } |
562 | 562 |
563 } // namespace cc | 563 } // namespace cc |
OLD | NEW |