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

Side by Side Diff: cc/CCRenderSurfaceTest.cpp

Issue 10916307: Add the ubercomp DelegatedRendererLayer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use OwnPtrVector 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/CCRenderSurface.cpp ('k') | cc/DelegatedRendererLayerChromium.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "CCRenderSurface.h" 7 #include "CCRenderSurface.h"
8 8
9 #include "CCAppendQuadsData.h" 9 #include "CCAppendQuadsData.h"
10 #include "CCLayerImpl.h" 10 #include "CCLayerImpl.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 OwnPtr<CCLayerImpl> dummyMask = CCLayerImpl::create(1); 64 OwnPtr<CCLayerImpl> dummyMask = CCLayerImpl::create(1);
65 WebTransformationMatrix dummyMatrix; 65 WebTransformationMatrix dummyMatrix;
66 dummyMatrix.translate(1.0, 2.0); 66 dummyMatrix.translate(1.0, 2.0);
67 67
68 // The rest of the surface properties are either internal and should not cau se change, 68 // The rest of the surface properties are either internal and should not cau se change,
69 // or they are already accounted for by the owninglayer->layerPropertyChange d(). 69 // or they are already accounted for by the owninglayer->layerPropertyChange d().
70 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setDrawOpacity(0.5) ); 70 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setDrawOpacity(0.5) );
71 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setDrawTransform(du mmyMatrix)); 71 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setDrawTransform(du mmyMatrix));
72 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setReplicaDrawTrans form(dummyMatrix)); 72 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->setReplicaDrawTrans form(dummyMatrix));
73 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->clearLayerList()); 73 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(renderSurface->clearLayerLists());
74 } 74 }
75 75
76 TEST(CCRenderSurfaceTest, sanityCheckSurfaceCreatesCorrectSharedQuadState) 76 TEST(CCRenderSurfaceTest, sanityCheckSurfaceCreatesCorrectSharedQuadState)
77 { 77 {
78 // This will fake that we are on the correct thread for testing purposes. 78 // This will fake that we are on the correct thread for testing purposes.
79 DebugScopedSetImplThread setImplThread; 79 DebugScopedSetImplThread setImplThread;
80 80
81 OwnPtr<CCLayerImpl> rootLayer = CCLayerImpl::create(1); 81 OwnPtr<CCLayerImpl> rootLayer = CCLayerImpl::create(1);
82 82
83 OwnPtr<CCLayerImpl> owningLayer = CCLayerImpl::create(2); 83 OwnPtr<CCLayerImpl> owningLayer = CCLayerImpl::create(2);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 ASSERT_EQ(1u, passSink.renderPasses().size()); 157 ASSERT_EQ(1u, passSink.renderPasses().size());
158 CCRenderPass* pass = passSink.renderPasses()[0]; 158 CCRenderPass* pass = passSink.renderPasses()[0];
159 159
160 EXPECT_EQ(CCRenderPass::Id(2, 0), pass->id()); 160 EXPECT_EQ(CCRenderPass::Id(2, 0), pass->id());
161 EXPECT_EQ(contentRect, pass->outputRect()); 161 EXPECT_EQ(contentRect, pass->outputRect());
162 EXPECT_EQ(origin, pass->transformToRootTarget()); 162 EXPECT_EQ(origin, pass->transformToRootTarget());
163 } 163 }
164 164
165 } // namespace 165 } // namespace
OLDNEW
« no previous file with comments | « cc/CCRenderSurface.cpp ('k') | cc/DelegatedRendererLayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698