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

Unified Diff: ui/gl/gl_image_io_surface.mm

Issue 1401423003: Re-land: ui: Move GLImage::BindTexImage fallback from GLImage implementations to GLES2CmdDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix stream texture issue Created 5 years, 2 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 | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_io_surface.mm
diff --git a/ui/gl/gl_image_io_surface.mm b/ui/gl/gl_image_io_surface.mm
index 3f4964e85438c4e4e6d1e2388ce8bf31e1e01e86..4294298d153138f452e46a146a7e201f4a789c2f 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -8,6 +8,9 @@
#include "base/lazy_instance.h"
#include "base/mac/foundation_util.h"
+#include "base/trace_event/memory_allocator_dump.h"
+#include "base/trace_event/memory_dump_manager.h"
+#include "base/trace_event/process_memory_dump.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
@@ -18,7 +21,7 @@
namespace gfx {
namespace {
-typedef std::map<gfx::AcceleratedWidget,CALayer*> WidgetToLayerMap;
+using WidgetToLayerMap = std::map<AcceleratedWidget, CALayer*>;
base::LazyInstance<WidgetToLayerMap> g_widget_to_layer_map;
bool ValidInternalFormat(unsigned internalformat) {
@@ -138,8 +141,7 @@ GLenum DataType(BufferFormat format) {
} // namespace
-GLImageIOSurface::GLImageIOSurface(const gfx::Size& size,
- unsigned internalformat)
+GLImageIOSurface::GLImageIOSurface(const Size& size, unsigned internalformat)
: size_(size),
internalformat_(internalformat),
format_(BufferFormat::RGBA_8888) {}
@@ -150,7 +152,7 @@ GLImageIOSurface::~GLImageIOSurface() {
}
bool GLImageIOSurface::Initialize(IOSurfaceRef io_surface,
- gfx::GenericSharedMemoryId io_surface_id,
+ GenericSharedMemoryId io_surface_id,
BufferFormat format) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!io_surface_);
@@ -176,7 +178,9 @@ void GLImageIOSurface::Destroy(bool have_context) {
io_surface_.reset();
}
-gfx::Size GLImageIOSurface::GetSize() { return size_; }
+Size GLImageIOSurface::GetSize() {
+ return size_;
+}
unsigned GLImageIOSurface::GetInternalFormat() { return internalformat_; }
@@ -205,13 +209,17 @@ bool GLImageIOSurface::BindTexImage(unsigned target) {
return true;
}
+bool GLImageIOSurface::CopyTexImage(unsigned target) {
+ return false;
+}
+
bool GLImageIOSurface::CopyTexSubImage(unsigned target,
const Point& offset,
const Rect& rect) {
return false;
}
-bool GLImageIOSurface::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
+bool GLImageIOSurface::ScheduleOverlayPlane(AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
@@ -233,8 +241,8 @@ void GLImageIOSurface::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
base::trace_event::MemoryAllocatorDump::kUnitsBytes,
static_cast<uint64_t>(size_bytes));
- auto guid = gfx::GetGenericSharedMemoryGUIDForTracing(process_tracing_id,
- io_surface_id_);
+ auto guid =
+ GetGenericSharedMemoryGUIDForTracing(process_tracing_id, io_surface_id_);
pmd->CreateSharedGlobalAllocatorDump(guid);
pmd->AddOwnershipEdge(dump->guid(), guid);
}
@@ -244,8 +252,8 @@ base::ScopedCFTypeRef<IOSurfaceRef> GLImageIOSurface::io_surface() {
}
// static
-void GLImageIOSurface::SetLayerForWidget(
- gfx::AcceleratedWidget widget, CALayer* layer) {
+void GLImageIOSurface::SetLayerForWidget(AcceleratedWidget widget,
+ CALayer* layer) {
if (layer)
g_widget_to_layer_map.Pointer()->insert(std::make_pair(widget, layer));
else
« no previous file with comments | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698