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

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

Issue 684653004: Plumb can_use_lcd_text, contents_opaque directly to ContentLayerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 resource_provider_.get()); 1640 resource_provider_.get());
1641 layer_tree_host_->SetRootLayer(nullptr); 1641 layer_tree_host_->SetRootLayer(nullptr);
1642 } 1642 }
1643 1643
1644 class TrackingLayerPainter : public LayerPainter { 1644 class TrackingLayerPainter : public LayerPainter {
1645 public: 1645 public:
1646 static scoped_ptr<TrackingLayerPainter> Create() { 1646 static scoped_ptr<TrackingLayerPainter> Create() {
1647 return make_scoped_ptr(new TrackingLayerPainter()); 1647 return make_scoped_ptr(new TrackingLayerPainter());
1648 } 1648 }
1649 1649
1650 void Paint(SkCanvas* canvas, const gfx::Rect& content_rect) override { 1650 void Paint(SkCanvas* canvas,
1651 const gfx::Rect& content_rect,
1652 bool can_use_lcd_text,
1653 bool contents_opaque) override {
1651 painted_rect_ = content_rect; 1654 painted_rect_ = content_rect;
1652 } 1655 }
1653 1656
1654 gfx::Rect PaintedRect() const { return painted_rect_; } 1657 gfx::Rect PaintedRect() const { return painted_rect_; }
1655 void ResetPaintedRect() { painted_rect_ = gfx::Rect(); } 1658 void ResetPaintedRect() { painted_rect_ = gfx::Rect(); }
1656 1659
1657 private: 1660 private:
1658 gfx::Rect painted_rect_; 1661 gfx::Rect painted_rect_;
1659 }; 1662 };
1660 1663
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 1757
1755 // Rounding leads to an extra pixel. 1758 // Rounding leads to an extra pixel.
1756 gfx::Rect expanded_layer_rect(layer_rect); 1759 gfx::Rect expanded_layer_rect(layer_rect);
1757 expanded_layer_rect.set_height(32); 1760 expanded_layer_rect.set_height(32);
1758 EXPECT_RECT_EQ(expanded_layer_rect, 1761 EXPECT_RECT_EQ(expanded_layer_rect,
1759 layer->tracking_layer_painter()->PaintedRect()); 1762 layer->tracking_layer_painter()->PaintedRect());
1760 } 1763 }
1761 1764
1762 } // namespace 1765 } // namespace
1763 } // namespace cc 1766 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698