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

Unified Diff: ui/gl/gl_image_io_surface.mm

Issue 1418483003: Revert of ui: Move GLImage::BindTexImage fallback from GLImage implementations to GLES2CmdDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 4294298d153138f452e46a146a7e201f4a789c2f..3f4964e85438c4e4e6d1e2388ce8bf31e1e01e86 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -8,9 +8,6 @@
#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"
@@ -21,7 +18,7 @@
namespace gfx {
namespace {
-using WidgetToLayerMap = std::map<AcceleratedWidget, CALayer*>;
+typedef std::map<gfx::AcceleratedWidget,CALayer*> WidgetToLayerMap;
base::LazyInstance<WidgetToLayerMap> g_widget_to_layer_map;
bool ValidInternalFormat(unsigned internalformat) {
@@ -141,7 +138,8 @@
} // namespace
-GLImageIOSurface::GLImageIOSurface(const Size& size, unsigned internalformat)
+GLImageIOSurface::GLImageIOSurface(const gfx::Size& size,
+ unsigned internalformat)
: size_(size),
internalformat_(internalformat),
format_(BufferFormat::RGBA_8888) {}
@@ -152,7 +150,7 @@
}
bool GLImageIOSurface::Initialize(IOSurfaceRef io_surface,
- GenericSharedMemoryId io_surface_id,
+ gfx::GenericSharedMemoryId io_surface_id,
BufferFormat format) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!io_surface_);
@@ -178,9 +176,7 @@
io_surface_.reset();
}
-Size GLImageIOSurface::GetSize() {
- return size_;
-}
+gfx::Size GLImageIOSurface::GetSize() { return size_; }
unsigned GLImageIOSurface::GetInternalFormat() { return internalformat_; }
@@ -209,17 +205,13 @@
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(AcceleratedWidget widget,
+bool GLImageIOSurface::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
@@ -241,8 +233,8 @@
base::trace_event::MemoryAllocatorDump::kUnitsBytes,
static_cast<uint64_t>(size_bytes));
- auto guid =
- GetGenericSharedMemoryGUIDForTracing(process_tracing_id, io_surface_id_);
+ auto guid = gfx::GetGenericSharedMemoryGUIDForTracing(process_tracing_id,
+ io_surface_id_);
pmd->CreateSharedGlobalAllocatorDump(guid);
pmd->AddOwnershipEdge(dump->guid(), guid);
}
@@ -252,8 +244,8 @@
}
// static
-void GLImageIOSurface::SetLayerForWidget(AcceleratedWidget widget,
- CALayer* layer) {
+void GLImageIOSurface::SetLayerForWidget(
+ gfx::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