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

Unified Diff: content/renderer/pepper/pepper_graphics_2d_host.h

Issue 600953003: Cache cc::SharedBitmaps used by PepperGraphics2DHost to upload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_graphics_2d_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_graphics_2d_host.h
diff --git a/content/renderer/pepper/pepper_graphics_2d_host.h b/content/renderer/pepper/pepper_graphics_2d_host.h
index 25df4d179a917c47256031c3ea1a8d1eeca4fa78..f5e5d47281924ae1822e703164a40f465dc07708 100644
--- a/content/renderer/pepper/pepper_graphics_2d_host.h
+++ b/content/renderer/pepper/pepper_graphics_2d_host.h
@@ -20,6 +20,7 @@
#include "ui/gfx/size.h"
namespace cc {
+class SharedBitmap;
class SingleReleaseCallback;
class TextureMailbox;
}
@@ -85,6 +86,8 @@ class CONTENT_EXPORT PepperGraphics2DHost
PPB_ImageData_Impl* ImageData();
gfx::Size Size() const;
+ void ClearCache();
+
private:
PepperGraphics2DHost(RendererPpapiHost* host,
PP_Instance instance,
@@ -157,6 +160,11 @@ class CONTENT_EXPORT PepperGraphics2DHost
gfx::Rect* op_rect,
gfx::Point* delta);
+ void ReleaseCallback(scoped_ptr<cc::SharedBitmap> bitmap,
+ const gfx::Size& bitmap_size,
+ uint32 sync_point,
+ bool lost_resource);
+
RendererPpapiHost* renderer_ppapi_host_;
scoped_refptr<PPB_ImageData_Impl> image_data_;
@@ -193,6 +201,11 @@ class CONTENT_EXPORT PepperGraphics2DHost
bool texture_mailbox_modified_;
bool is_using_texture_layer_;
+ // This is a bitmap that was recently released by the compositor and may be
+ // used to transfer bytes to the compositor again.
+ scoped_ptr<cc::SharedBitmap> cached_bitmap_;
+ gfx::Size cached_bitmap_size_;
+
friend class PepperGraphics2DHostTest;
DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost);
};
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_graphics_2d_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698