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

Side by Side Diff: cc/CCRenderSurfaceFiltersTest.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/CCRenderSurfaceFilters.cpp ('k') | cc/CCRenderSurfaceTest.cpp » ('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 "CCRenderSurfaceFilters.h" 7 #include "CCRenderSurfaceFilters.h"
8 8
9 #include "CompositorFakeWebGraphicsContext3D.h" 9 #include "CompositorFakeWebGraphicsContext3D.h"
10 #include <gtest/gtest.h> 10 #include <gtest/gtest.h>
11 #include <public/WebFilterOperation.h> 11 #include <public/WebFilterOperation.h>
12 #include <public/WebFilterOperations.h> 12 #include <public/WebFilterOperations.h>
13 #include <wtf/RefPtr.h> 13 #include <wtf/RefPtr.h>
14 14
15 using namespace WebCore; 15 using namespace cc;
16 using namespace WebKit; 16 using namespace WebKit;
17 17
18 namespace { 18 namespace {
19 19
20 // Checks whether op can be combined with a following color matrix. 20 // Checks whether op can be combined with a following color matrix.
21 bool isCombined(const WebFilterOperation& op) 21 bool isCombined(const WebFilterOperation& op)
22 { 22 {
23 WebFilterOperations filters; 23 WebFilterOperations filters;
24 filters.append(op); 24 filters.append(op);
25 filters.append(WebFilterOperation::createBrightnessFilter(0)); // brightness (0) is identity. 25 filters.append(WebFilterOperation::createBrightnessFilter(0)); // brightness (0) is identity.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 filters.append(doesntCombine); 132 filters.append(doesntCombine);
133 optimized = CCRenderSurfaceFilters::optimize(filters); 133 optimized = CCRenderSurfaceFilters::optimize(filters);
134 EXPECT_EQ(2u, optimized.size()); 134 EXPECT_EQ(2u, optimized.size());
135 135
136 filters.append(doesntCombine); 136 filters.append(doesntCombine);
137 optimized = CCRenderSurfaceFilters::optimize(filters); 137 optimized = CCRenderSurfaceFilters::optimize(filters);
138 EXPECT_EQ(3u, optimized.size()); 138 EXPECT_EQ(3u, optimized.size());
139 } 139 }
140 140
141 } // namespace 141 } // namespace
OLDNEW
« no previous file with comments | « cc/CCRenderSurfaceFilters.cpp ('k') | cc/CCRenderSurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698