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

Unified Diff: cc/test/MockCCQuadCuller.cpp

Issue 10947047: Fix remaining cc files to compile with Clang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FakeCCDelayBasedTimeSource 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/MockCCQuadCuller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/MockCCQuadCuller.cpp
diff --git a/cc/test/MockCCQuadCuller.cpp b/cc/test/MockCCQuadCuller.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5d01c96e8287185983050b3e17b33a1426a3447e
--- /dev/null
+++ b/cc/test/MockCCQuadCuller.cpp
@@ -0,0 +1,47 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+
+#include "MockCCQuadCuller.h"
+
+namespace cc {
+
+MockCCQuadCuller::MockCCQuadCuller()
+ : m_activeQuadList(m_quadListStorage)
+ , m_activeSharedQuadStateList(m_sharedQuadStateStorage)
+{
+}
+
+MockCCQuadCuller::MockCCQuadCuller(CCQuadList& externalQuadList, CCSharedQuadStateList& externalSharedQuadStateList)
+ : m_activeQuadList(externalQuadList)
+ , m_activeSharedQuadStateList(externalSharedQuadStateList)
+{
+}
+
+MockCCQuadCuller::~MockCCQuadCuller()
+{
+}
+
+bool MockCCQuadCuller::append(PassOwnPtr<CCDrawQuad> newQuad, CCAppendQuadsData&)
+{
+ OwnPtr<CCDrawQuad> drawQuad = newQuad;
+ if (!drawQuad->quadRect().isEmpty()) {
+ m_activeQuadList.append(drawQuad.release());
+ return true;
+ }
+ return false;
+}
+
+CCSharedQuadState* MockCCQuadCuller::useSharedQuadState(PassOwnPtr<CCSharedQuadState> passSharedQuadState)
+{
+ OwnPtr<CCSharedQuadState> sharedQuadState(passSharedQuadState);
+ sharedQuadState->id = m_activeSharedQuadStateList.size();
+
+ CCSharedQuadState* rawPtr = sharedQuadState.get();
+ m_activeSharedQuadStateList.append(sharedQuadState.release());
+ return rawPtr;
+}
+
+} // namespace cc
« no previous file with comments | « cc/test/MockCCQuadCuller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698