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

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

Issue 303113007: Add software renderer support for surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | 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 #include "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 6
7 #include "cc/layers/delegated_frame_resource_collection.h" 7 #include "cc/layers/delegated_frame_resource_collection.h"
8 #include "cc/layers/delegated_renderer_layer.h" 8 #include "cc/layers/delegated_renderer_layer.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 #include "cc/surfaces/surface_aggregator.h" 10 #include "cc/surfaces/surface_aggregator.h"
11 #include "cc/surfaces/surface_client.h" 11 #include "cc/surfaces/surface_client.h"
12 #include "cc/surfaces/surfaces_export.h" 12 #include "cc/surfaces/surfaces_export.h"
13 #include "cc/trees/layer_tree_host_client.h" 13 #include "cc/trees/layer_tree_host_client.h"
14 #include "cc/trees/layer_tree_host_single_thread_client.h" 14 #include "cc/trees/layer_tree_host_single_thread_client.h"
15 15
16 namespace gfx { 16 namespace gfx {
17 class Size; 17 class Size;
18 } 18 }
19 19
20 namespace cc { 20 namespace cc {
21 21
22 class DirectRenderer; 22 class DirectRenderer;
23 class DisplayClient; 23 class DisplayClient;
24 class LayerTreeHost; 24 class LayerTreeHost;
25 class OutputSurface; 25 class OutputSurface;
26 class ResourceProvider; 26 class ResourceProvider;
27 class SharedBitmapManager;
27 class Surface; 28 class Surface;
28 class SurfaceManager; 29 class SurfaceManager;
29 30
30 class CC_SURFACES_EXPORT Display 31 class CC_SURFACES_EXPORT Display
31 : public SurfaceClient, 32 : public SurfaceClient,
32 public DelegatedFrameResourceCollectionClient, 33 public DelegatedFrameResourceCollectionClient,
33 NON_EXPORTED_BASE(public LayerTreeHostClient), 34 NON_EXPORTED_BASE(public LayerTreeHostClient),
34 NON_EXPORTED_BASE(public LayerTreeHostSingleThreadClient) { 35 NON_EXPORTED_BASE(public LayerTreeHostSingleThreadClient) {
35 public: 36 public:
36 Display(DisplayClient* client, SurfaceManager* manager); 37 Display(DisplayClient* client,
38 SurfaceManager* manager,
39 SharedBitmapManager* bitmap_manager);
37 virtual ~Display(); 40 virtual ~Display();
38 41
39 void Resize(const gfx::Size& new_size); 42 void Resize(const gfx::Size& new_size);
40 bool Draw(); 43 bool Draw();
41 44
42 int CurrentSurfaceID(); 45 int CurrentSurfaceID();
43 46
44 // LayerTreeHostClient implementation. 47 // LayerTreeHostClient implementation.
45 virtual void WillBeginMainFrame(int frame_id) OVERRIDE {} 48 virtual void WillBeginMainFrame(int frame_id) OVERRIDE {}
46 virtual void DidBeginMainFrame() OVERRIDE {} 49 virtual void DidBeginMainFrame() OVERRIDE {}
(...skipping 21 matching lines...) Expand all
68 virtual void ReturnResources(const ReturnedResourceArray& resources) OVERRIDE; 71 virtual void ReturnResources(const ReturnedResourceArray& resources) OVERRIDE;
69 72
70 private: 73 private:
71 void DoComposite(); 74 void DoComposite();
72 75
73 bool scheduled_draw_; 76 bool scheduled_draw_;
74 77
75 DisplayClient* client_; 78 DisplayClient* client_;
76 SurfaceManager* manager_; 79 SurfaceManager* manager_;
77 SurfaceAggregator aggregator_; 80 SurfaceAggregator aggregator_;
81 SharedBitmapManager* bitmap_manager_;
78 scoped_ptr<Surface> current_surface_; 82 scoped_ptr<Surface> current_surface_;
79 scoped_ptr<LayerTreeHost> layer_tree_host_; 83 scoped_ptr<LayerTreeHost> layer_tree_host_;
80 scoped_refptr<DelegatedFrameResourceCollection> resource_collection_; 84 scoped_refptr<DelegatedFrameResourceCollection> resource_collection_;
81 scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_; 85 scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_;
82 scoped_refptr<DelegatedRendererLayer> delegated_layer_; 86 scoped_refptr<DelegatedRendererLayer> delegated_layer_;
83 87
84 DISALLOW_COPY_AND_ASSIGN(Display); 88 DISALLOW_COPY_AND_ASSIGN(Display);
85 }; 89 };
86 90
87 } // namespace cc 91 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698