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

Unified Diff: content/common/gpu/image_transport_surface_ozone.cc

Issue 14985005: Support for ozone graphics in content and gpu/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: freshened patch Created 7 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
« no previous file with comments | « no previous file | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface_ozone.cc
diff --git a/content/common/gpu/image_transport_surface_android.cc b/content/common/gpu/image_transport_surface_ozone.cc
similarity index 77%
copy from content/common/gpu/image_transport_surface_android.cc
copy to content/common/gpu/image_transport_surface_ozone.cc
index 2d8ee4373d8f30b7b74343acd212879610a1a6e4..1cc195de9986b763ac360f42b3da6f7284793106 100644
--- a/content/common/gpu/image_transport_surface_android.cc
+++ b/content/common/gpu/image_transport_surface_ozone.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "content/common/gpu/gpu_surface_lookup.h"
+#include "ui/base/ozone/surface_factory_ozone.h"
#include "ui/gl/gl_surface_egl.h"
namespace content {
@@ -16,16 +17,14 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
GpuChannelManager* manager,
GpuCommandBufferStub* stub,
const gfx::GLSurfaceHandle& handle) {
- DCHECK(GpuSurfaceLookup::GetInstance());
DCHECK_EQ(handle.transport_type, gfx::NATIVE_DIRECT);
- ANativeWindow* window =
- GpuSurfaceLookup::GetInstance()->AcquireNativeWidget(
- stub->surface_id());
+
+ gfx::AcceleratedWidget window =
+ ui::SurfaceFactoryOzone::GetInstance()->GetAcceleratedWidget(
+ handle);
piman 2013/05/21 21:28:56 This feels weird. The intent of the GLSurfaceHandl
rjkroege 2013/05/22 17:20:05 I was going down the wrong path here. The changes
scoped_refptr<gfx::GLSurface> surface =
new gfx::NativeViewGLSurfaceEGL(false, window);
bool initialize_success = surface->Initialize();
- if (window)
- ANativeWindow_release(window);
if (!initialize_success)
return scoped_refptr<gfx::GLSurface>();
« no previous file with comments | « no previous file | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698