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

Unified Diff: content/public/browser/android/compositor.h

Issue 287593002: android: content::UIResourceProvider and content::UIResourceClientAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: user->listener Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/android/compositor.h
diff --git a/content/public/browser/android/compositor.h b/content/public/browser/android/compositor.h
index 7cb73e258386415e941768e8151745a667865d1b..71eb858a090c26a86634f9c7c5406dd9b23f71c5 100644
--- a/content/public/browser/android/compositor.h
+++ b/content/public/browser/android/compositor.h
@@ -7,8 +7,8 @@
#include "base/callback.h"
#include "cc/resources/ui_resource_bitmap.h"
-#include "cc/resources/ui_resource_client.h"
#include "content/common/content_export.h"
+#include "content/public/browser/android/ui_resource_provider.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -25,6 +25,7 @@ class JavaBitmap;
namespace content {
class CompositorClient;
+class UIResourceProvider;
// An interface to the browser-side compositor.
class CONTENT_EXPORT Compositor {
@@ -72,20 +73,9 @@ class CONTENT_EXPORT Compositor {
// Composite immediately. Used in single-threaded mode.
virtual void Composite() = 0;
- // Generates a UIResource and returns a UIResourceId. |is_transient|
- // indicates whether or not to release the resource once the bitmap
- // has been uploaded. May return 0.
- virtual cc::UIResourceId GenerateUIResource(const SkBitmap& bitmap,
- bool is_transient) = 0;
-
- // Generates an ETC1 compressed UIResource. See above for |is_transient|.
- // May return 0.
- virtual cc::UIResourceId GenerateCompressedUIResource(const gfx::Size& size,
- void* pixels,
- bool is_transient) = 0;
-
- // Deletes a UIResource.
- virtual void DeleteUIResource(cc::UIResourceId resource_id) = 0;
+ // Returns the UI resource provider associated with the compositor. Any
+ // caller of this method cannot out-live the compositor.
+ virtual UIResourceProvider* GetUIResourceProvider() = 0;
protected:
Compositor() {}

Powered by Google App Engine
This is Rietveld 408576698