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

Side by Side Diff: cc/resources/ui_resource_client.h

Issue 2748263002: Move cc::DisplayItemList and related classes into cc/paint/ (Closed)
Patch Set: Merge branch 'master' into ccpaint Created 3 years, 9 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 | « cc/resources/ui_resource_bitmap.h ('k') | cc/resources/ui_resource_manager.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_RESOURCES_UI_RESOURCE_CLIENT_H_ 5 #ifndef CC_RESOURCES_UI_RESOURCE_CLIENT_H_
6 #define CC_RESOURCES_UI_RESOURCE_CLIENT_H_ 6 #define CC_RESOURCES_UI_RESOURCE_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/cc_export.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class UIResourceBitmap; 14 class UIResourceBitmap;
15 15
16 typedef int UIResourceId; 16 typedef int UIResourceId;
17 17
18 class CC_EXPORT UIResourceClient { 18 class CC_EXPORT UIResourceClient {
19 public: 19 public:
20 // GetBitmap() will be called once soon after resource creation and then will 20 // GetBitmap() will be called once soon after resource creation and then will
21 // be called afterwards whenever the GL context is lost, on the same thread 21 // be called afterwards whenever the GL context is lost, on the same thread
22 // that LayerTreeHost::CreateUIResource was called on. It is only safe to 22 // that LayerTreeHost::CreateUIResource was called on. It is only safe to
23 // delete a UIResourceClient object after DeleteUIResource has been called for 23 // delete a UIResourceClient object after DeleteUIResource has been called for
24 // all IDs associated with it. A valid bitmap always must be returned but it 24 // all IDs associated with it. A valid bitmap always must be returned but it
25 // doesn't need to be the same size or format as the original. 25 // doesn't need to be the same size or format as the original.
26 // The bitmap's dimensions must *not* exceed the maximum texture size 26 // The bitmap's dimensions must *not* exceed the maximum texture size
27 // supported by the GPU. For resources that are not bigger than the viewport 27 // supported by the GPU. For resources that are not bigger than the viewport
28 // this should not be a problem, but for much larger resources, the caller is 28 // this should not be a problem, but for much larger resources, the caller is
29 // responsible for ensuring this. 29 // responsible for ensuring this.
30 virtual UIResourceBitmap GetBitmap(UIResourceId uid, 30 virtual UIResourceBitmap GetBitmap(UIResourceId uid,
31 bool resource_lost) = 0; 31 bool resource_lost) = 0;
32 virtual ~UIResourceClient() {} 32 virtual ~UIResourceClient() {}
33 }; 33 };
34 34
35 } // namespace cc 35 } // namespace cc
36 36
37 #endif // CC_RESOURCES_UI_RESOURCE_CLIENT_H_ 37 #endif // CC_RESOURCES_UI_RESOURCE_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/resources/ui_resource_bitmap.h ('k') | cc/resources/ui_resource_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698