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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp

Issue 1393083003: Implement interest rects for synchronized paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 28 matching lines...) Expand all
39 #include "wtf/PassOwnPtr.h" 39 #include "wtf/PassOwnPtr.h"
40 #include <gtest/gtest.h> 40 #include <gtest/gtest.h>
41 41
42 namespace blink { 42 namespace blink {
43 43
44 namespace { 44 namespace {
45 45
46 class MockGraphicsLayerClient : public GraphicsLayerClient { 46 class MockGraphicsLayerClient : public GraphicsLayerClient {
47 public: 47 public:
48 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect& inClip) const override { } 48 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect& inClip) const override { }
49 void paintContentsIfNeeded(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase) const override { }
49 String debugName(const GraphicsLayer*) override { return String(); } 50 String debugName(const GraphicsLayer*) override { return String(); }
50 }; 51 };
51 52
52 class GraphicsLayerForTesting : public GraphicsLayer { 53 class GraphicsLayerForTesting : public GraphicsLayer {
53 public: 54 public:
54 explicit GraphicsLayerForTesting(GraphicsLayerClient* client) 55 explicit GraphicsLayerForTesting(GraphicsLayerClient* client)
55 : GraphicsLayer(client) { } 56 : GraphicsLayer(client) { }
56 57
57 WebLayer* contentsLayer() const override { return GraphicsLayer::contentsLay er(); } 58 WebLayer* contentsLayer() const override { return GraphicsLayer::contentsLay er(); }
58 }; 59 };
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 175
175 WebDoublePoint scrollPosition(7, 9); 176 WebDoublePoint scrollPosition(7, 9);
176 m_platformLayer->setScrollPositionDouble(scrollPosition); 177 m_platformLayer->setScrollPositionDouble(scrollPosition);
177 m_graphicsLayer->didScroll(); 178 m_graphicsLayer->didScroll();
178 179
179 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x() ); 180 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x() );
180 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y() ); 181 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y() );
181 } 182 }
182 183
183 } // namespace blink 184 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698