summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp33
1 files changed, 28 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp b/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp
index 1ebb369..a24f829 100644
--- a/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp
+++ b/Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp
@@ -1,3 +1,28 @@
+/*
+ * Copyright 2012, The Android Open Source Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#define LOG_TAG "GraphicsOperationCollection"
#define LOG_NDEBUG 1
@@ -6,11 +31,10 @@
#include "AndroidLog.h"
#include "GraphicsContext.h"
+#include "GraphicsOperation.h"
#include "PlatformGraphicsContext.h"
#include "PlatformGraphicsContextRecording.h"
-#if USE(ACCELERATED_COMPOSITING)
-
namespace WebCore {
GraphicsOperationCollection::GraphicsOperationCollection()
@@ -26,7 +50,8 @@ void GraphicsOperationCollection::apply(PlatformGraphicsContext* context) const
{
size_t size = m_operations.size();
for (size_t i = 0; i < size; i++)
- m_operations[i]->apply(context);
+ if (!m_operations[i]->apply(context))
+ return;
}
void GraphicsOperationCollection::adoptAndAppend(GraphicsOperation::Operation* operation)
@@ -57,5 +82,3 @@ void GraphicsOperationCollection::clear()
}
} // namespace WebCore
-
-#endif // USE(ACCELERATED_COMPOSITING)