Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334637 - Refactor GC
Summary: Refactor GC
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.4 M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 318900 334627
  Show dependency tree
 
Reported: 2011-01-18 08:39 EST by Rüdiger Herrmann CLA
Modified: 2011-01-28 07:53 EST (History)
0 users

See Also:


Attachments
Proposed refactoring (99.12 KB, patch)
2011-01-18 09:03 EST, Rüdiger Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2011-01-18 08:39:24 EST
The GC implementation in its current state does two things. It serves as a GC for 'Devices' like in new GC( display ) with all actual drawing operations implemented as no-ops, plus it handles the actual drawing on canvases like so: new GC( canvas). With bug 334627 in mind, the situation will become even worse.

The GC should be refactored act as a facade that delegates to distinct implementations that do the actual work of drawing on a certain 'surface'.
Comment 1 Rüdiger Herrmann CLA 2011-01-18 09:03:30 EST
Created attachment 186997 [details]
Proposed refactoring

A new abstract class GCDelegate was introduced. The GC holds an instance of GCDelegate and almost all methods delegate to this instance.
Currently two implementations of GCDelegate exist: DeviceGC and ControlGC
Comment 2 Rüdiger Herrmann CLA 2011-01-28 07:53:44 EST
Released patch to CVS HEAD