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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/surface_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 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #define EXPECT_BOTH_NE(expression, x) \ 43 #define EXPECT_BOTH_NE(expression, x) \
44 do { \ 44 do { \
45 EXPECT_NE(x, pending_layer_->expression); \ 45 EXPECT_NE(x, pending_layer_->expression); \
46 EXPECT_NE(x, active_layer_->expression); \ 46 EXPECT_NE(x, active_layer_->expression); \
47 } while (false) 47 } while (false)
48 48
49 class MockCanvas : public SkCanvas { 49 class MockCanvas : public SkCanvas {
50 public: 50 public:
51 explicit MockCanvas(int w, int h) : SkCanvas(w, h) {} 51 explicit MockCanvas(int w, int h) : SkCanvas(w, h) {}
52 52
53 void drawRect(const SkRect& rect, const SkPaint& paint) override { 53 void onDrawRect(const SkRect& rect, const SkPaint& paint) override {
54 // Capture calls before SkCanvas quickReject() kicks in. 54 // Capture calls before SkCanvas quickReject() kicks in.
55 rects_.push_back(rect); 55 rects_.push_back(rect);
56 } 56 }
57 57
58 std::vector<SkRect> rects_; 58 std::vector<SkRect> rects_;
59 }; 59 };
60 60
61 class NoLowResTilingsSettings : public ImplSidePaintingSettings {}; 61 class NoLowResTilingsSettings : public ImplSidePaintingSettings {};
62 62
63 class LowResTilingsSettings : public ImplSidePaintingSettings { 63 class LowResTilingsSettings : public ImplSidePaintingSettings {
(...skipping 4668 matching lines...) Expand 10 before | Expand all | Expand 10 after
4732 result = layer->CalculateTileSize(gfx::Size(447, 400)); 4732 result = layer->CalculateTileSize(gfx::Size(447, 400));
4733 EXPECT_EQ(result.width(), 448); 4733 EXPECT_EQ(result.width(), 448);
4734 EXPECT_EQ(result.height(), 448); 4734 EXPECT_EQ(result.height(), 448);
4735 result = layer->CalculateTileSize(gfx::Size(500, 499)); 4735 result = layer->CalculateTileSize(gfx::Size(500, 499));
4736 EXPECT_EQ(result.width(), 512); 4736 EXPECT_EQ(result.width(), 512);
4737 EXPECT_EQ(result.height(), 500 + 2); 4737 EXPECT_EQ(result.height(), 500 + 2);
4738 } 4738 }
4739 4739
4740 } // namespace 4740 } // namespace
4741 } // namespace cc 4741 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/surface_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698