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"
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());
36 SharedQuadState
* MockQuadCuller::useSharedQuadState(scoped_ptr
<SharedQuadState
> sharedQuadState
)
38 SharedQuadState
* rawPtr
= sharedQuadState
.get();
39 m_activeSharedQuadStateList
.push_back(sharedQuadState
.Pass());