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

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

Issue 2700833002: Simplify rate limiter logic in Canvas2DLayerBridge (Closed)
Patch Set: make more readable 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..20b09b98396a4165064372d3df86d29d38d5adda 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;
@@ -259,14 +252,13 @@ class PLATFORM_EXPORT Canvas2DLayerBridge
WeakPtrFactory<Canvas2DLayerBridge> m_weakPtrFactory;
ImageBuffer* m_imageBuffer;
int m_msaaSampleCount;
+ int m_framesSinceLastCommit = 0;
size_t m_bytesAllocated;
bool m_haveRecordedDrawCommands;
bool m_destructionInProgress;
SkFilterQuality m_filterQuality;
bool m_isHidden;
bool m_isDeferralEnabled;
- bool m_isRegisteredTaskObserver;
- bool m_renderingTaskCompletedForCurrentFrame;
bool m_softwareRenderingWhileHidden;
bool m_surfaceCreationFailedAtLeastOnce = false;
bool m_hibernationScheduled = false;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698