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

Side by Side Diff: experimental/c_salt/graphics_2d_context.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 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 unified diff | Download patch
« no previous file with comments | « experimental/c_salt/filechooser.txt ('k') | experimental/c_salt/graphics_2d_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2010 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #ifndef C_SALT_GRAPHICS_2D_CONTEXT_H_
6 #define C_SALT_GRAPHICS_2D_CONTEXT_H_
7
8 #include "c_salt/rect.h"
9 #include "boost/scoped_ptr.hpp"
10
11 namespace c_salt {
12 class Image;
13 class Instance;
14 class Graphics2DContextImpl;
15
16 // Manage a 2D graphics context associated with an instance. This class
17 // encapsulates the 2D rendering context.
18 // drawing.
19 class Graphics2DContext {
20 public:
21 // Constructor might not immediately create the underlying 2D graphics
22 // context. The context is not actually created until Init() is called.
23 Graphics2DContext();
24 virtual ~Graphics2DContext();
25
26 // Called when the owning Instance is fully connected to the browser; at this
27 // point, implementations can safely make calls into the browser.
28 bool Init(const c_salt::Instance& instance);
29
30 // Returns the size of the plugin image.
31 const Size& GetSize() const {return size_;}
32
33 // Copy |img| pixels into graphics context and flush the contents of this
34 // context to the real device.
35 void Update(const Image& img);
36
37 protected:
38 // Not implemented.
39 Graphics2DContext(const Graphics2DContext&);
40 Graphics2DContext& operator=(const Graphics2DContext&);
41
42 boost::scoped_ptr<Graphics2DContextImpl> impl_;
43 Size size_; // size of the plugin image.
44 };
45 } // namespace c_salt
46
47 #endif // C_SALT_GRAPHICS_2D_CONTEXT_H_
48
OLDNEW
« no previous file with comments | « experimental/c_salt/filechooser.txt ('k') | experimental/c_salt/graphics_2d_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698