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

Unified Diff: cc/output/output_surface.h

Issue 2329623003: cc: Remove unneeded methods from OutputSurface. (Closed)
Patch Set: shrink-os-api: moreblimp Created 4 years, 3 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: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 1524af049e65fb182ae3e561c31711837f72053b..d0d5fd47e1489c4b0ee29c3127b4c577ed3c8cb8 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -119,8 +119,8 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
bool alpha);
gfx::Size SurfaceSize() const { return surface_size_; }
- virtual void ApplyExternalStencil();
virtual bool HasExternalStencilTest() const;
+ virtual void ApplyExternalStencil();
// ============== CONTENT COLLATOR ONLY =========================
@@ -180,34 +180,13 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
virtual void SwapBuffers(CompositorFrame frame) = 0;
virtual void OnSwapBuffersComplete();
- // This is how LayerTreeHostImpl hears about context loss when the Display
- // is the one listening for context loss. Also used internally for the
- // context provider to inform the LayerTreeHostImpl or Display about loss.
- // It would become display-compositor-only when LayerTreeHostImpl receives
- // its contexts independently from the "OutputSurface".
- // TODO(danakj): Be private. Subclasses should just call the client directly.
- virtual void DidLoseOutputSurface();
-
// base::trace_event::MemoryDumpProvider implementation.
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override;
protected:
- // ============== DISPLAY COMPOSITOR ONLY =======================
-
- // Used by WebView for the display compositor only.
- // TODO(danakj): This should go away, store the state in the subclass that
- // uses this.
- void SetExternalStencilTest(bool enabled);
-
- // ============== BOTH TYPES OF COMPOSITOR ======================
-
// This is used by both display and delegating implementations.
void PostSwapBuffersComplete();
- // TODO(danakj): Delete this. Subclasses should just call the client directly.
- void SetNeedsRedrawRect(const gfx::Rect& damage_rect);
- // TODO(danakj): Delete this. Subclasses should just call the client directly.
- void ReclaimResources(const ReturnedResourceArray& resources);
OutputSurfaceClient* client_ = nullptr;
@@ -226,7 +205,13 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
private:
void DetachFromClientInternal();
- bool external_stencil_test_enabled_ = false;
+ // This is how LayerTreeHostImpl hears about context loss when the Display
+ // is the one listening for context loss. Also used internally for the
+ // context provider to inform the LayerTreeHostImpl or Display about loss.
+ // It would become display-compositor-only when LayerTreeHostImpl receives
+ // its contexts independently from the "OutputSurface".
+ void DidLoseOutputSurface();
+
base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(OutputSurface);

Powered by Google App Engine
This is Rietveld 408576698