summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-08-10 15:37:26 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-08-10 15:37:27 -0700
commit4c7e6e151b9c49fec439974383c1ba87079e934d (patch)
tree2811b8ff3ca65dbe3450199c87913e8b56cf1eb6
parent475624abf906e078ce765e876d2e3db116997f42 (diff)
parentb50b15512d5b30dc479751a45cd8a515c172a354 (diff)
downloadexternal_webkit-4c7e6e151b9c49fec439974383c1ba87079e934d.zip
external_webkit-4c7e6e151b9c49fec439974383c1ba87079e934d.tar.gz
external_webkit-4c7e6e151b9c49fec439974383c1ba87079e934d.tar.bz2
Merge "Clear mOperationState when calling popState" into jb-mr1-dev
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp19
-rw-r--r--Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h2
2 files changed, 14 insertions, 7 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
index 6c033b6..355e52c 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.cpp
@@ -448,6 +448,7 @@ PlatformGraphicsContextRecording::PlatformGraphicsContextRecording(Recording* re
, m_isEmpty(true)
, m_canvasProxy(this)
{
+ ALOGV("RECORDING: begin");
if (mRecording)
mRecording->setRecording(new RecordingImpl());
mMatrixStack.append(SkMatrix::I());
@@ -455,6 +456,11 @@ PlatformGraphicsContextRecording::PlatformGraphicsContextRecording(Recording* re
pushStateOperation(new (canvasStateHeap()) CanvasState(0));
}
+PlatformGraphicsContextRecording::~PlatformGraphicsContextRecording()
+{
+ ALOGV("RECORDING: end");
+}
+
bool PlatformGraphicsContextRecording::isPaintingDisabled()
{
return !mRecording;
@@ -872,7 +878,7 @@ void PlatformGraphicsContextRecording::clipState(const FloatRect& clip)
void PlatformGraphicsContextRecording::pushStateOperation(CanvasState* canvasState)
{
- ALOGV("pushStateOperation: %p(isLayer=%d)", canvasState, canvasState->isTransparencyLayer());
+ ALOGV("RECORDING: pushStateOperation: %p(isLayer=%d)", canvasState, canvasState->isTransparencyLayer());
mRecordingStateStack.append(canvasState);
mRecording->recording()->addCanvasState(canvasState);
}
@@ -881,14 +887,15 @@ void PlatformGraphicsContextRecording::popStateOperation()
{
RecordingState state = mRecordingStateStack.last();
mRecordingStateStack.removeLast();
+ mOperationState = 0;
if (!state.mHasDrawing) {
- ALOGV("popStateOperation is deleting %p(isLayer=%d)",
+ ALOGV("RECORDING: popStateOperation is deleting %p(isLayer=%d)",
state.mCanvasState, state.mCanvasState->isTransparencyLayer());
mRecording->recording()->removeCanvasState(state.mCanvasState);
state.mCanvasState->~CanvasState();
canvasStateHeap()->rewindTo(state.mCanvasState);
} else {
- ALOGV("popStateOperation: %p(isLayer=%d)",
+ ALOGV("RECORDING: popStateOperation: %p(isLayer=%d)",
state.mCanvasState, state.mCanvasState->isTransparencyLayer());
// Make sure we propagate drawing upwards so we don't delete our parent
mRecordingStateStack.last().mHasDrawing = true;
@@ -967,7 +974,7 @@ void PlatformGraphicsContextRecording::appendDrawingOperation(
WebCore::IntRect ibounds = calculateFinalBounds(untranslatedBounds);
if (ibounds.isEmpty()) {
- ALOGV("Operation %s() was clipped out", operation->name());
+ ALOGV("RECORDING: Operation %s() was clipped out", operation->name());
operation->~Operation();
operationHeap()->rewindTo(operation);
return;
@@ -980,7 +987,7 @@ void PlatformGraphicsContextRecording::appendDrawingOperation(
// if the operation maps to an opaque rect, record the area it will cover
operation->setOpaqueRect(calculateCoveredBounds(untranslatedBounds));
}
- ALOGV("appendOperation %p->%s() bounds " INT_RECT_FORMAT, operation, operation->name(),
+ ALOGV("RECORDING: appendOperation %p->%s() bounds " INT_RECT_FORMAT, operation, operation->name(),
INT_RECT_ARGS(ibounds));
RecordingData* data = new RecordingData(operation, mRecording->recording()->m_nodeCount++);
mRecording->recording()->m_tree.insert(ibounds, data);
@@ -988,7 +995,7 @@ void PlatformGraphicsContextRecording::appendDrawingOperation(
void PlatformGraphicsContextRecording::appendStateOperation(GraphicsOperation::Operation* operation)
{
- ALOGV("appendOperation %p->%s()", operation, operation->name());
+ ALOGV("RECORDING: appendOperation %p->%s()", operation, operation->name());
RecordingData* data = new RecordingData(operation, mRecording->recording()->m_nodeCount++);
mRecordingStateStack.last().mCanvasState->adoptAndAppend(data);
}
diff --git a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
index 0461749..d62eb8a 100644
--- a/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
+++ b/Source/WebCore/platform/graphics/android/context/PlatformGraphicsContextRecording.h
@@ -60,7 +60,7 @@ private:
class PlatformGraphicsContextRecording : public PlatformGraphicsContext {
public:
PlatformGraphicsContextRecording(Recording* picture);
- virtual ~PlatformGraphicsContextRecording() {}
+ virtual ~PlatformGraphicsContextRecording();
virtual bool isPaintingDisabled();
virtual SkCanvas* recordingCanvas();