Add signalSyncPoint to the WebGraphicsContext3D command buffer impls.
[chromium-blink-merge.git] / cc / test / mock_quad_culler.cc
blobf9924c8bb053521a64c1f8f80b7355766204e0dd
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/quads/draw_quad.h"
9 namespace cc {
11 MockQuadCuller::MockQuadCuller()
12 : active_quad_list_(&quad_list_storage_),
13 active_shared_quad_state_list_(&shared_quad_state_storage_) {}
15 MockQuadCuller::MockQuadCuller(
16 QuadList* external_quad_list,
17 SharedQuadStateList* external_shared_quad_state_list)
18 : active_quad_list_(external_quad_list),
19 active_shared_quad_state_list_(external_shared_quad_state_list) {}
21 MockQuadCuller::~MockQuadCuller() {}
23 bool MockQuadCuller::Append(scoped_ptr<DrawQuad> draw_quad, AppendQuadsData*) {
24 if (!draw_quad->rect.IsEmpty()) {
25 active_quad_list_->push_back(draw_quad.Pass());
26 return true;
28 return false;
31 SharedQuadState* MockQuadCuller::UseSharedQuadState(
32 scoped_ptr<SharedQuadState> shared_quad_state) {
33 SharedQuadState* raw_ptr = shared_quad_state.get();
34 active_shared_quad_state_list_->push_back(shared_quad_state.Pass());
35 return raw_ptr;
38 } // namespace cc