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

Side by Side Diff: cc/test/CCLayerTestCommon.cpp

Issue 10914268: Change cc files from namespace WebCore to cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/CCLayerTestCommon.h ('k') | cc/test/CCOcclusionTrackerTestCommon.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "config.h" 5 #include "config.h"
6 6
7 #include "CCLayerTestCommon.h" 7 #include "CCLayerTestCommon.h"
8 #include "CCDrawQuad.h" 8 #include "CCDrawQuad.h"
9 9
10 #include <gtest/gtest.h> 10 #include <gtest/gtest.h>
11 #include <wtf/Vector.h> 11 #include <wtf/Vector.h>
12 12
13 using namespace WebCore; 13 using namespace cc;
14 14
15 namespace CCLayerTestCommon { 15 namespace CCLayerTestCommon {
16 16
17 // Align with expected and actual output 17 // Align with expected and actual output
18 const char* quadString = " Quad: "; 18 const char* quadString = " Quad: ";
19 19
20 void verifyQuadsExactlyCoverRect(const CCQuadList& quads, const IntRect& rect) 20 void verifyQuadsExactlyCoverRect(const CCQuadList& quads, const IntRect& rect)
21 { 21 {
22 Region remaining(rect); 22 Region remaining(rect);
23 23
24 for (size_t i = 0; i < quads.size(); ++i) { 24 for (size_t i = 0; i < quads.size(); ++i) {
25 CCDrawQuad* quad = quads[i].get(); 25 CCDrawQuad* quad = quads[i].get();
26 IntRect quadRect = quad->quadRect(); 26 IntRect quadRect = quad->quadRect();
27 27
28 EXPECT_TRUE(rect.contains(quadRect)) << quadString << i; 28 EXPECT_TRUE(rect.contains(quadRect)) << quadString << i;
29 EXPECT_TRUE(remaining.contains(quadRect)) << quadString << i; 29 EXPECT_TRUE(remaining.contains(quadRect)) << quadString << i;
30 remaining.subtract(Region(quadRect)); 30 remaining.subtract(Region(quadRect));
31 } 31 }
32 32
33 EXPECT_TRUE(remaining.isEmpty()); 33 EXPECT_TRUE(remaining.isEmpty());
34 } 34 }
35 35
36 } // namespace 36 } // namespace
OLDNEW
« no previous file with comments | « cc/test/CCLayerTestCommon.h ('k') | cc/test/CCOcclusionTrackerTestCommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698