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

Side by Side Diff: cc/surfaces/display.h

Issue 331533002: Use a struct for cc::Surface ids for more type safety (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add is_null and explicit ctor Created 6 years, 6 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
« no previous file with comments | « cc/quads/surface_draw_quad.cc ('k') | cc/surfaces/display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_SURFACES_DISPLAY_H_ 5 #ifndef CC_SURFACES_DISPLAY_H_
6 #define CC_SURFACES_DISPLAY_H_ 6 #define CC_SURFACES_DISPLAY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 #include "cc/output/output_surface_client.h" 10 #include "cc/output/output_surface_client.h"
11 #include "cc/output/renderer.h" 11 #include "cc/output/renderer.h"
12 #include "cc/surfaces/surface_aggregator.h" 12 #include "cc/surfaces/surface_aggregator.h"
13 #include "cc/surfaces/surface_client.h" 13 #include "cc/surfaces/surface_client.h"
14 #include "cc/surfaces/surface_id.h"
14 #include "cc/surfaces/surfaces_export.h" 15 #include "cc/surfaces/surfaces_export.h"
15 16
16 namespace gfx { 17 namespace gfx {
17 class Size; 18 class Size;
18 } 19 }
19 20
20 namespace cc { 21 namespace cc {
21 22
22 class DirectRenderer; 23 class DirectRenderer;
23 class DisplayClient; 24 class DisplayClient;
24 class OutputSurface; 25 class OutputSurface;
25 class ResourceProvider; 26 class ResourceProvider;
26 class SharedBitmapManager; 27 class SharedBitmapManager;
27 class Surface; 28 class Surface;
28 class SurfaceManager; 29 class SurfaceManager;
29 30
30 class CC_SURFACES_EXPORT Display : public SurfaceClient, 31 class CC_SURFACES_EXPORT Display : public SurfaceClient,
31 public OutputSurfaceClient, 32 public OutputSurfaceClient,
32 public RendererClient { 33 public RendererClient {
33 public: 34 public:
34 Display(DisplayClient* client, 35 Display(DisplayClient* client,
35 SurfaceManager* manager, 36 SurfaceManager* manager,
36 SharedBitmapManager* bitmap_manager); 37 SharedBitmapManager* bitmap_manager);
37 virtual ~Display(); 38 virtual ~Display();
38 39
39 void Resize(const gfx::Size& new_size); 40 void Resize(const gfx::Size& new_size);
40 bool Draw(); 41 bool Draw();
41 42
42 int CurrentSurfaceID(); 43 SurfaceId CurrentSurfaceId();
43 44
44 // OutputSurfaceClient implementation. 45 // OutputSurfaceClient implementation.
45 virtual void DeferredInitialize() OVERRIDE {} 46 virtual void DeferredInitialize() OVERRIDE {}
46 virtual void ReleaseGL() OVERRIDE {} 47 virtual void ReleaseGL() OVERRIDE {}
47 virtual void CommitVSyncParameters(base::TimeTicks timebase, 48 virtual void CommitVSyncParameters(base::TimeTicks timebase,
48 base::TimeDelta interval) OVERRIDE {} 49 base::TimeDelta interval) OVERRIDE {}
49 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) OVERRIDE {} 50 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) OVERRIDE {}
50 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {} 51 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {}
51 virtual void DidSwapBuffers() OVERRIDE {} 52 virtual void DidSwapBuffers() OVERRIDE {}
52 virtual void DidSwapBuffersComplete() OVERRIDE {} 53 virtual void DidSwapBuffersComplete() OVERRIDE {}
(...skipping 27 matching lines...) Expand all
80 scoped_ptr<ResourceProvider> resource_provider_; 81 scoped_ptr<ResourceProvider> resource_provider_;
81 scoped_ptr<DirectRenderer> renderer_; 82 scoped_ptr<DirectRenderer> renderer_;
82 int child_id_; 83 int child_id_;
83 84
84 DISALLOW_COPY_AND_ASSIGN(Display); 85 DISALLOW_COPY_AND_ASSIGN(Display);
85 }; 86 };
86 87
87 } // namespace cc 88 } // namespace cc
88 89
89 #endif // CC_SURFACES_DISPLAY_H_ 90 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW
« no previous file with comments | « cc/quads/surface_draw_quad.cc ('k') | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698