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

Side by Side Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 900043002: Modify rasterize_and_record for DisplayItemList recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 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/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <tuple>
9 10
10 #include "cc/animation/layer_animation_controller.h" 11 #include "cc/animation/layer_animation_controller.h"
11 #include "cc/animation/transform_operations.h" 12 #include "cc/animation/transform_operations.h"
12 #include "cc/base/math_util.h" 13 #include "cc/base/math_util.h"
13 #include "cc/layers/content_layer.h" 14 #include "cc/layers/content_layer.h"
14 #include "cc/layers/content_layer_client.h" 15 #include "cc/layers/content_layer_client.h"
15 #include "cc/layers/layer.h" 16 #include "cc/layers/layer.h"
16 #include "cc/layers/layer_client.h" 17 #include "cc/layers/layer_client.h"
17 #include "cc/layers/layer_impl.h" 18 #include "cc/layers/layer_impl.h"
18 #include "cc/layers/layer_iterator.h" 19 #include "cc/layers/layer_iterator.h"
(...skipping 30 matching lines...) Expand all
49 private: 50 private:
50 ~LayerWithForcedDrawsContent() override {} 51 ~LayerWithForcedDrawsContent() override {}
51 }; 52 };
52 53
53 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } 54 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; }
54 55
55 class MockContentLayerClient : public ContentLayerClient { 56 class MockContentLayerClient : public ContentLayerClient {
56 public: 57 public:
57 MockContentLayerClient() {} 58 MockContentLayerClient() {}
58 ~MockContentLayerClient() override {} 59 ~MockContentLayerClient() override {}
59 void PaintContents( 60 void PaintContents(SkCanvas* canvas,
60 SkCanvas* canvas, 61 const gfx::Rect& clip,
61 const gfx::Rect& clip, 62 PaintingControlSetting picture_control) override {}
62 ContentLayerClient::GraphicsContextStatus gc_status) override {}
63 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( 63 scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
64 const gfx::Rect& clip, 64 const gfx::Rect& clip,
65 GraphicsContextStatus gc_status) override { 65 PaintingControlSetting picture_control) override {
66 NOTIMPLEMENTED(); 66 NOTIMPLEMENTED();
67 return DisplayItemList::Create(); 67 return DisplayItemList::Create();
68 } 68 }
69 bool FillsBoundsCompletely() const override { return false; } 69 bool FillsBoundsCompletely() const override { return false; }
70 }; 70 };
71 71
72 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer( 72 scoped_refptr<FakePictureLayer> CreateDrawablePictureLayer(
73 ContentLayerClient* delegate) { 73 ContentLayerClient* delegate) {
74 scoped_refptr<FakePictureLayer> to_return = 74 scoped_refptr<FakePictureLayer> to_return =
75 FakePictureLayer::Create(delegate); 75 FakePictureLayer::Create(delegate);
(...skipping 8591 matching lines...) Expand 10 before | Expand all | Expand 10 after
8667 8667
8668 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 8668 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
8669 8669
8670 gfx::Rect affected_by_delta(0, 0, root_size.width(), 8670 gfx::Rect affected_by_delta(0, 0, root_size.width(),
8671 root_size.height() + 50); 8671 root_size.height() + 50);
8672 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); 8672 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect());
8673 } 8673 }
8674 8674
8675 } // namespace 8675 } // namespace
8676 } // namespace cc 8676 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698