2

What exactly is the relationship between a Surface and Canvas.

Please explain.

JasonMArcher
  • 13,296
  • 21
  • 55
  • 51
Namratha
  • 16,400
  • 26
  • 87
  • 124

1 Answers1

5

A surface is a buffer. A Canvas holds the drawing.

Views are not attached to the Canvas nor the Surface. The window is tied to a Surface and the ViewRoot asks the Surface for a Canvas that is then used by the Views to draw onto.

For a detailled anwser, you can read this whole discussion, really interesting.

Sephy
  • 49,272
  • 30
  • 120
  • 129