summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/context
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-07-19 15:23:14 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-07-19 15:23:15 -0700
commitf6e85179ce1bea972c8fb4860f2f14fb107195cb (patch)
treee471c0dca840d79515baa766bce810279c18bac2 /Source/WebCore/platform/graphics/android/context
parent6fda3e621352a695b3b6a02c6008d372b7c6febc (diff)
parentf899e6e3a8952453ea79363d36a4d171eebb0fbb (diff)
downloadexternal_webkit-f6e85179ce1bea972c8fb4860f2f14fb107195cb.zip
external_webkit-f6e85179ce1bea972c8fb4860f2f14fb107195cb.tar.gz
external_webkit-f6e85179ce1bea972c8fb4860f2f14fb107195cb.tar.bz2
Merge "Perform check for text/content on recording context PicturePiles"
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context')
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp5
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
index df0ffd6..f11154d 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
@@ -162,6 +162,8 @@ PlatformGraphicsContextRecording::PlatformGraphicsContextRecording(Recording* re
, mRecording(recording)
, mOperationState(0)
, mOperationMatrix(0)
+ , m_hasText(false)
+ , m_isEmpty(true)
{
pushMatrix();
if (mRecording)
@@ -188,6 +190,8 @@ void PlatformGraphicsContextRecording::endRecording(const SkRect& bounds)
GraphicsOperation::DrawComplexText* text = new GraphicsOperation::DrawComplexText(mPicture);
appendDrawingOperation(text, bounds);
mPicture = 0;
+
+ m_hasText = true;
}
//**************************************
@@ -599,6 +603,7 @@ void PlatformGraphicsContextRecording::appendDrawingOperation(
ALOGW("Empty bounds for %s(%s)!", operation->name(), operation->parameters().ascii().data());
return;
}
+ m_isEmpty = false;
SkRect bounds;
mCurrentMatrix->mapRect(&bounds, untranslatedBounds);
if (mRecordingStateStack.size()) {
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
index 6c51852..89f9bbb 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
@@ -136,6 +136,8 @@ public:
virtual void strokePath(const Path& pathToStroke);
virtual void strokeRect(const FloatRect& rect, float lineWidth);
+ bool hasText() { return m_hasText; }
+ bool isEmpty() { return m_isEmpty; }
private:
virtual bool shadowsIgnoreTransforms() const {
@@ -194,6 +196,9 @@ private:
Vector<SkMatrix> mMatrixStack;
State* mOperationState;
SkMatrix* mOperationMatrix;
+
+ bool m_hasText;
+ bool m_isEmpty;
};
}