Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h

Issue 2700833002: Simplify rate limiter logic in Canvas2DLayerBridge (Closed)
Patch Set: add trace Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
index d1a7f13c9543e5fcd40c7d0c8799d237f01a029b..af91f3543ffc84a20e2d112266df0f88bb677ffc 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -34,7 +34,6 @@
#include "platform/graphics/paint/PaintRecorder.h"
#include "platform/graphics/paint/PaintSurface.h"
#include "public/platform/WebExternalTextureLayer.h"
-#include "public/platform/WebThread.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "ui/gfx/color_space.h"
@@ -80,7 +79,6 @@ class SharedContextRateLimiter;
class PLATFORM_EXPORT Canvas2DLayerBridge
: public NON_EXPORTED_BASE(cc::TextureLayerClient),
- public WebThread::TaskObserver,
public RefCounted<Canvas2DLayerBridge> {
WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge);
@@ -205,13 +203,8 @@ class PLATFORM_EXPORT Canvas2DLayerBridge
void startRecording();
void skipQueuedDrawCommands();
void flushRecordingOnly();
- void unregisterTaskObserver();
void reportSurfaceCreationFailure();
- // WebThread::TaskOberver implementation
- void willProcessTask() override;
- void didProcessTask() override;
-
PaintSurface* getOrCreateSurface(AccelerationHint = PreferAcceleration);
bool shouldAccelerate(AccelerationHint) const;
@@ -265,8 +258,7 @@ class PLATFORM_EXPORT Canvas2DLayerBridge
SkFilterQuality m_filterQuality;
bool m_isHidden;
bool m_isDeferralEnabled;
- bool m_isRegisteredTaskObserver;
- bool m_renderingTaskCompletedForCurrentFrame;
+ bool m_previousFrameWasPresented;
bool m_softwareRenderingWhileHidden;
bool m_surfaceCreationFailedAtLeastOnce = false;
bool m_hibernationScheduled = false;

Powered by Google App Engine
This is Rietveld 408576698