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

Unified Diff: samplecode/SampleApp.h

Issue 580073003: use surface in SkView/SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « include/views/SkWindow.h ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.h
diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h
index e08ff8a8f4ff325fc8567fe027b0c0e57f88a6db..abb1f2400211481554c4ded7cf50c191298a2534 100644
--- a/samplecode/SampleApp.h
+++ b/samplecode/SampleApp.h
@@ -76,7 +76,7 @@ public:
// called before drawing. should install correct device
// type on the canvas. Will skip drawing if returns false.
- virtual SkCanvas* createCanvas(DeviceType dType, SampleWindow* win) = 0;
+ virtual SkSurface* createSurface(DeviceType dType, SampleWindow* win) = 0;
// called after drawing, should get the results onto the
// screen.
@@ -100,18 +100,18 @@ public:
SampleWindow(void* hwnd, int argc, char** argv, DeviceManager*);
virtual ~SampleWindow();
- virtual SkCanvas* createCanvas() SK_OVERRIDE {
- SkCanvas* canvas = NULL;
+ virtual SkSurface* createSurface() SK_OVERRIDE {
+ SkSurface* surface = NULL;
if (fDevManager) {
- canvas = fDevManager->createCanvas(fDeviceType, this);
+ surface = fDevManager->createSurface(fDeviceType, this);
}
- if (NULL == canvas) {
- canvas = this->INHERITED::createCanvas();
+ if (NULL == surface) {
+ surface = this->INHERITED::createSurface();
}
- return canvas;
+ return surface;
}
- virtual void draw(SkCanvas* canvas);
+ virtual void draw(SkCanvas*) SK_OVERRIDE;
void setDeviceType(DeviceType type);
void toggleRendering();
« no previous file with comments | « include/views/SkWindow.h ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698