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

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

Issue 18191020: UI Resource Manager (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Added DCHECK of resource queue size to PushPropertiesTo Created 7 years, 4 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.cc ('k') | cc/test/fake_scoped_ui_resource.h » ('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 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_UI_RESOURCE_CLIENT_H_
6 #define CC_RESOURCES_UI_RESOURCE_CLIENT_H_
7
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h"
11 #include "cc/base/cc_export.h"
12
13 namespace cc {
14
15 class UIResourceBitmap;
16
17 typedef int UIResourceId;
18
19 class CC_EXPORT UIResourceClient {
20 public:
21 // GetBitmap() will be called once soon after resource creation and then will
22 // be called afterwards whenever the GL context is lost, on the same thread
23 // that LayerTreeHost::CreateUIResource was called on. It is only safe to
24 // delete a UIResourceClient object after DeleteUIResource has been called for
25 // all IDs associated with it. A valid bitmap always must be returned but it
26 // doesn't need to be the same size or format as the original.
27 virtual scoped_refptr<UIResourceBitmap> GetBitmap(UIResourceId uid,
28 bool resource_lost) = 0;
29 virtual ~UIResourceClient() {}
30 };
31
32 } // namespace cc
33
34 #endif // CC_RESOURCES_UI_RESOURCE_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/resources/ui_resource_bitmap.cc ('k') | cc/test/fake_scoped_ui_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698