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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "build/build_config.h"
6 #include "cc/layers/content_layer_client.h"
7 #include "cc/layers/picture_image_layer.h"
8 #include "cc/layers/picture_layer.h"
9 #include "cc/layers/solid_color_layer.h"
10 #include "cc/test/fake_content_layer_client.h"
11 #include "cc/test/layer_tree_pixel_test.h"
12 #include "cc/test/pixel_comparator.h"
13
14 #if !defined(OS_ANDROID)
15
16 namespace cc {
17 namespace {
18
19 class LayerTreeHostSynchronousPixelTest : public LayerTreePixelTest {
20 public:
21 void InitializeSettings(LayerTreeSettings* settings) override {
22 LayerTreePixelTest::InitializeSettings(settings);
23 settings->single_thread_proxy_scheduler = false;
24 }
25
26 void BeginTest() override {
27 LayerTreePixelTest::BeginTest();
28 PostCompositeImmediatelyToMainThread();
29 }
30 };
31
32 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) {
33 gfx::Size bounds(200, 200);
34
35 FakeContentLayerClient client;
36 SkPaint green_paint;
37 green_paint.setColor(SkColorSetARGB(255, 0, 255, 0));
38 client.add_draw_rect(gfx::RectF(bounds), green_paint);
39 scoped_refptr<PictureLayer> root = PictureLayer::Create(&client);
40 root->SetBounds(bounds);
41 root->SetIsDrawable(true);
42
43 RunSingleThreadedPixelTest(
44 PIXEL_TEST_GL, root, base::FilePath(FILE_PATH_LITERAL("green.png")));
45 }
46
47 } // namespace
48 } // namespace cc
49
50 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698