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

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

Issue 2375363002: cc/blimp: Set up the framework for state serialization. (Closed)
Patch Set: test update Created 4 years, 2 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.cc ('k') | cc/layers/solid_color_scrollbar_layer.h » ('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.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void set_nearest_neighbor(bool nearest_neighbor) { 64 void set_nearest_neighbor(bool nearest_neighbor) {
65 picture_layer_inputs_.nearest_neighbor = nearest_neighbor; 65 picture_layer_inputs_.nearest_neighbor = nearest_neighbor;
66 } 66 }
67 67
68 void ValidateSerialization( 68 void ValidateSerialization(
69 ImageSerializationProcessor* image_serialization_processor, 69 ImageSerializationProcessor* image_serialization_processor,
70 LayerTreeHostInProcess* host) { 70 LayerTreeHostInProcess* host) {
71 std::vector<uint32_t> engine_picture_ids = GetPictureIds(); 71 std::vector<uint32_t> engine_picture_ids = GetPictureIds();
72 proto::LayerProperties proto; 72 proto::LayerProperties proto;
73 LayerSpecificPropertiesToProto(&proto); 73 LayerSpecificPropertiesToProto(&proto, false);
74 74
75 FakeEnginePictureCache* engine_picture_cache = 75 FakeEnginePictureCache* engine_picture_cache =
76 static_cast<FakeEnginePictureCache*>(host->engine_picture_cache()); 76 static_cast<FakeEnginePictureCache*>(host->engine_picture_cache());
77 EXPECT_THAT(engine_picture_ids, 77 EXPECT_THAT(engine_picture_ids,
78 testing::UnorderedElementsAreArray( 78 testing::UnorderedElementsAreArray(
79 engine_picture_cache->GetAllUsedPictureIds())); 79 engine_picture_cache->GetAllUsedPictureIds()));
80 80
81 scoped_refptr<TestSerializationPictureLayer> layer = 81 scoped_refptr<TestSerializationPictureLayer> layer =
82 TestSerializationPictureLayer::Create(recording_source_viewport_); 82 TestSerializationPictureLayer::Create(recording_source_viewport_);
83 host->GetLayerTree()->SetRootLayer(layer); 83 host->GetLayerTree()->SetRootLayer(layer);
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // Do a main frame, record the picture layers. The frame number has changed 548 // Do a main frame, record the picture layers. The frame number has changed
549 // non-monotonically. 549 // non-monotonically.
550 layer->SetNeedsDisplay(); 550 layer->SetNeedsDisplay();
551 host2->Composite(base::TimeTicks::Now()); 551 host2->Composite(base::TimeTicks::Now());
552 EXPECT_EQ(3, layer->update_count()); 552 EXPECT_EQ(3, layer->update_count());
553 EXPECT_EQ(1, host2->SourceFrameNumber()); 553 EXPECT_EQ(1, host2->SourceFrameNumber());
554 } 554 }
555 555
556 } // namespace 556 } // namespace
557 } // namespace cc 557 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/solid_color_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698