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

Side by Side Diff: cc/CCRendererGLTest.cpp

Issue 10979010: Remove WTF HashMap and PassOwnPtr dependencies for CCRenderPass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCRenderSurfaceTest.cpp ('k') | cc/CCRendererSoftwareTest.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 #include "CCRendererGL.h" 6 #include "CCRendererGL.h"
7 7
8 #include "CCDrawQuad.h" 8 #include "CCDrawQuad.h"
9 #include "CCPrioritizedTextureManager.h" 9 #include "CCPrioritizedTextureManager.h"
10 #include "CCResourceProvider.h" 10 #include "CCResourceProvider.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 class FakeCCRendererClient : public CCRendererClient { 57 class FakeCCRendererClient : public CCRendererClient {
58 public: 58 public:
59 FakeCCRendererClient() 59 FakeCCRendererClient()
60 : m_setFullRootLayerDamageCount(0) 60 : m_setFullRootLayerDamageCount(0)
61 , m_rootLayer(CCLayerImpl::create(1)) 61 , m_rootLayer(CCLayerImpl::create(1))
62 , m_memoryAllocationLimitBytes(CCPrioritizedTextureManager::defaultMemor yAllocationLimit()) 62 , m_memoryAllocationLimitBytes(CCPrioritizedTextureManager::defaultMemor yAllocationLimit())
63 { 63 {
64 m_rootLayer->createRenderSurface(); 64 m_rootLayer->createRenderSurface();
65 CCRenderPass::Id renderPassId = m_rootLayer->renderSurface()->renderPass Id(); 65 CCRenderPass::Id renderPassId = m_rootLayer->renderSurface()->renderPass Id();
66 OwnPtr<CCRenderPass> rootRenderPass = CCRenderPass::create(renderPassId, IntRect(), WebTransformationMatrix()); 66 scoped_ptr<CCRenderPass> rootRenderPass = CCRenderPass::create(renderPas sId, IntRect(), WebTransformationMatrix());
67 m_renderPassesInDrawOrder.append(rootRenderPass.get()); 67 m_renderPassesInDrawOrder.append(rootRenderPass.get());
68 m_renderPasses.set(renderPassId, rootRenderPass.release()); 68 m_renderPasses.set(renderPassId, rootRenderPass.Pass());
69 } 69 }
70 70
71 // CCRendererClient methods. 71 // CCRendererClient methods.
72 virtual const IntSize& deviceViewportSize() const OVERRIDE { static IntSize fakeSize(1, 1); return fakeSize; } 72 virtual const IntSize& deviceViewportSize() const OVERRIDE { static IntSize fakeSize(1, 1); return fakeSize; }
73 virtual const CCLayerTreeSettings& settings() const OVERRIDE { static CCLaye rTreeSettings fakeSettings; return fakeSettings; } 73 virtual const CCLayerTreeSettings& settings() const OVERRIDE { static CCLaye rTreeSettings fakeSettings; return fakeSettings; }
74 virtual void didLoseContext() OVERRIDE { } 74 virtual void didLoseContext() OVERRIDE { }
75 virtual void onSwapBuffersComplete() OVERRIDE { } 75 virtual void onSwapBuffersComplete() OVERRIDE { }
76 virtual void setFullRootLayerDamage() OVERRIDE { m_setFullRootLayerDamageCou nt++; } 76 virtual void setFullRootLayerDamage() OVERRIDE { m_setFullRootLayerDamageCou nt++; }
77 virtual void releaseContentsTextures() OVERRIDE { } 77 virtual void releaseContentsTextures() OVERRIDE { }
78 virtual void setMemoryAllocationLimitBytes(size_t bytes) OVERRIDE { m_memory AllocationLimitBytes = bytes; } 78 virtual void setMemoryAllocationLimitBytes(size_t bytes) OVERRIDE { m_memory AllocationLimitBytes = bytes; }
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 FakeCCRendererGL renderer(&mockClient, resourceProvider.get()); 419 FakeCCRendererGL renderer(&mockClient, resourceProvider.get());
420 420
421 mockClient.rootRenderPass()->setHasTransparentBackground(true); 421 mockClient.rootRenderPass()->setHasTransparentBackground(true);
422 422
423 EXPECT_TRUE(renderer.initialize()); 423 EXPECT_TRUE(renderer.initialize());
424 424
425 renderer.drawFrame(mockClient.renderPassesInDrawOrder(), mockClient.renderPa sses()); 425 renderer.drawFrame(mockClient.renderPassesInDrawOrder(), mockClient.renderPa sses());
426 426
427 EXPECT_EQ(1, context->clearCount()); 427 EXPECT_EQ(1, context->clearCount());
428 } 428 }
OLDNEW
« no previous file with comments | « cc/CCRenderSurfaceTest.cpp ('k') | cc/CCRendererSoftwareTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698