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

Side by Side Diff: runtime/embedders/openglui/common/graphics_handler.h

Issue 12212074: Support for non-DOM canvases/contexts (backed by bitaps). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef EMBEDDERS_OPENGLUI_COMMON_GRAPHICS_HANDLER_H_ 5 #ifndef EMBEDDERS_OPENGLUI_COMMON_GRAPHICS_HANDLER_H_
6 #define EMBEDDERS_OPENGLUI_COMMON_GRAPHICS_HANDLER_H_ 6 #define EMBEDDERS_OPENGLUI_COMMON_GRAPHICS_HANDLER_H_
7 7
8 #include "embedders/openglui/common/isized.h" 8 #include "embedders/openglui/common/isized.h"
9 #include "embedders/openglui/common/opengl.h" 9 #include "embedders/openglui/common/opengl.h"
10 #include "embedders/openglui/common/support.h" 10 #include "embedders/openglui/common/support.h"
(...skipping 18 matching lines...) Expand all
29 virtual void Stop(); 29 virtual void Stop();
30 30
31 void SwapBuffers() { 31 void SwapBuffers() {
32 GLSwapBuffers(); 32 GLSwapBuffers();
33 } 33 }
34 34
35 virtual int32_t Update(); 35 virtual int32_t Update();
36 36
37 void SetViewport(int left, int top, int width, int height); 37 void SetViewport(int left, int top, int width, int height);
38 38
39 SkCanvas* CreateCanvas(); 39 SkCanvas* CreateDisplayCanvas();
40 40 SkCanvas* CreateBitmapCanvas(int width, int height);
41 void Flush() {
42 // TODO(gram): see if we really need this.
43 grcontext->flush();
44 }
45 41
46 virtual ~GraphicsHandler() { 42 virtual ~GraphicsHandler() {
47 } 43 }
48 44
49 protected: 45 protected:
50 SkAutoGraphics ag; 46 SkAutoGraphics ag;
51 GrContext* grcontext; 47 GrContext* grcontext;
52 int32_t width_, height_; 48 int32_t width_, height_;
53 }; 49 };
54 50
55 extern GraphicsHandler* graphics; 51 extern GraphicsHandler* graphics;
56 52
57 #endif // EMBEDDERS_OPENGLUI_COMMON_GRAPHICS_HANDLER_H_ 53 #endif // EMBEDDERS_OPENGLUI_COMMON_GRAPHICS_HANDLER_H_
58 54
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698