add a use_alsa gyp setting
[chromium-blink-merge.git] / cc / test / mock_quad_culler.cc
blobc2e5dbdc2f28f89290882f2c2685d0753a2adae5
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
3 // found in the LICENSE file.
5 #include "cc/test/mock_quad_culler.h"
7 #include "cc/draw_quad.h"
9 namespace cc {
11 MockQuadCuller::MockQuadCuller()
12 : m_activeQuadList(m_quadListStorage)
13 , m_activeSharedQuadStateList(m_sharedQuadStateStorage)
17 MockQuadCuller::MockQuadCuller(QuadList& externalQuadList, SharedQuadStateList& externalSharedQuadStateList)
18 : m_activeQuadList(externalQuadList)
19 , m_activeSharedQuadStateList(externalSharedQuadStateList)
23 MockQuadCuller::~MockQuadCuller()
27 bool MockQuadCuller::append(scoped_ptr<DrawQuad> drawQuad, AppendQuadsData&)
29 if (!drawQuad->rect.IsEmpty()) {
30 m_activeQuadList.push_back(drawQuad.Pass());
31 return true;
33 return false;
36 SharedQuadState* MockQuadCuller::useSharedQuadState(scoped_ptr<SharedQuadState> sharedQuadState)
38 SharedQuadState* rawPtr = sharedQuadState.get();
39 m_activeSharedQuadStateList.push_back(sharedQuadState.Pass());
40 return rawPtr;
43 } // namespace cc