Backed out changeset 61465f67b591 (bug 1167235)

This commit is contained in:
Sebastian Hengst 2016-06-28 20:28:22 +02:00
parent 92c1ecdea3
commit 955599781a
2 changed files with 0 additions and 40 deletions

View File

@ -42,7 +42,6 @@
#include "nsPIDOMWindow.h"
#include "nsDisplayList.h"
#include "nsFocusManager.h"
#include "nsContentUtils.h"
#include "nsTArray.h"
@ -1066,7 +1065,6 @@ CanvasRenderingContext2D::CanvasRenderingContext2D()
, mResetLayer(true)
, mIPC(false)
, mIsSkiaGL(false)
, mHasPendingStableStateCallback(false)
, mDrawObserver(nullptr)
, mIsEntireFrameInvalid(false)
, mPredictManyRedrawCalls(false)
@ -1511,27 +1509,6 @@ CanvasRenderingContext2D::CheckSizeForSkiaGL(IntSize aSize) {
return threshold < 0 || (aSize.width * aSize.height) <= threshold;
}
void
CanvasRenderingContext2D::ScheduleStableStateCallback()
{
if (mHasPendingStableStateCallback) {
return;
}
mHasPendingStableStateCallback = true;
nsContentUtils::RunInStableState(
NewRunnableMethod(this, &CanvasRenderingContext2D::OnStableState)
);
}
void
CanvasRenderingContext2D::OnStableState()
{
ReturnTarget();
mHasPendingStableStateCallback = false;
}
CanvasRenderingContext2D::RenderingMode
CanvasRenderingContext2D::EnsureTarget(const gfx::Rect* aCoveredRect,
RenderingMode aRenderingMode)
@ -1560,8 +1537,6 @@ CanvasRenderingContext2D::EnsureTarget(const gfx::Rect* aCoveredRect,
mTarget = mBufferProvider->BorrowDrawTarget(IntRect(0, 0, mWidth, mHeight));
}
ScheduleStableStateCallback();
if (mTarget) {
// Restore clip and transform.
mTarget->SetTransform(CurrentState().transform);

View File

@ -640,19 +640,6 @@ protected:
RenderingMode EnsureTarget(const gfx::Rect* aCoveredRect = nullptr,
RenderingMode aRenderMode = RenderingMode::DefaultBackendMode);
/**
* This method is run at the end of the event-loop spin where
* ScheduleStableStateCallback was called.
*
* We use it to unlock resources that need to be locked while drawing.
*/
void OnStableState();
/**
* Cf. OnStableState.
*/
void ScheduleStableStateCallback();
/**
* Disposes an old target and prepares to lazily create a new target.
*/
@ -744,8 +731,6 @@ protected:
// requesting the DT from mBufferProvider to check.
bool mIsSkiaGL;
bool mHasPendingStableStateCallback;
nsTArray<CanvasRenderingContext2DUserData*> mUserDatas;
// If mCanvasElement is not provided, then a docshell is