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

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

Issue 1441973003: Use recomputed interest rect only if it changed enough (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 /* 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "public/platform/WebUnitTestSupport.h" 42 #include "public/platform/WebUnitTestSupport.h"
43 #include "wtf/PassOwnPtr.h" 43 #include "wtf/PassOwnPtr.h"
44 #include <gtest/gtest.h> 44 #include <gtest/gtest.h>
45 45
46 namespace blink { 46 namespace blink {
47 47
48 namespace { 48 namespace {
49 49
50 class MockGraphicsLayerClient : public GraphicsLayerClient { 50 class MockGraphicsLayerClient : public GraphicsLayerClient {
51 public: 51 public:
52 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect* inClip) const override { } 52 IntRect paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerP aintingPhase, const IntRect*) const override { return IntRect(); }
53 String debugName(const GraphicsLayer*) override { return String(); } 53 String debugName(const GraphicsLayer*) override { return String(); }
54 }; 54 };
55 55
56 class GraphicsLayerForTesting : public GraphicsLayer { 56 class GraphicsLayerForTesting : public GraphicsLayer {
57 public: 57 public:
58 explicit GraphicsLayerForTesting(GraphicsLayerClient* client) 58 explicit GraphicsLayerForTesting(GraphicsLayerClient* client)
59 : GraphicsLayer(client) { } 59 : GraphicsLayer(client) { }
60 }; 60 };
61 61
62 } // anonymous namespace 62 } // anonymous namespace
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 WebDoublePoint scrollPosition(7, 9); 232 WebDoublePoint scrollPosition(7, 9);
233 m_platformLayer->setScrollPositionDouble(scrollPosition); 233 m_platformLayer->setScrollPositionDouble(scrollPosition);
234 m_graphicsLayer->didScroll(); 234 m_graphicsLayer->didScroll();
235 235
236 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x() ); 236 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x() );
237 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y() ); 237 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y() );
238 } 238 }
239 239
240 } // namespace blink 240 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698