diff options
author | John Reck <jreck@google.com> | 2012-07-10 10:10:18 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-07-10 10:36:12 -0700 |
commit | 22ddc4a8f76077593fba14c8cafffc74f9170dab (patch) | |
tree | 1b0d6b3587a2b159cb3f73a278be35164b50e715 /Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp | |
parent | 1fcb8aa079de156851042d8e041254b7abeecc77 (diff) | |
download | external_webkit-22ddc4a8f76077593fba14c8cafffc74f9170dab.zip external_webkit-22ddc4a8f76077593fba14c8cafffc74f9170dab.tar.gz external_webkit-22ddc4a8f76077593fba14c8cafffc74f9170dab.tar.bz2 |
Build a clipping tree in RecordingContext
Change-Id: I967c8e2ea209c848e6a09b44390ab2228b213ca5
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/context/GraphicsOperationCollection.cpp | 33 |
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) |