Respond with QuotaExceededError when IndexedDB has no disk space on open.
[chromium-blink-merge.git] / content / common / gpu / image_transport_surface_linux.cc
blob238d74d42c9afd2484481d01c5086926cf0dcea6
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/common/gpu/image_transport_surface.h"
7 namespace content {
9 // static
10 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
11 GpuChannelManager* manager,
12 GpuCommandBufferStub* stub,
13 const gfx::GLSurfaceHandle& handle) {
14 DCHECK(handle.handle);
15 DCHECK(handle.transport_type == gfx::NATIVE_DIRECT ||
16 handle.transport_type == gfx::NATIVE_TRANSPORT);
17 scoped_refptr<gfx::GLSurface> surface =
18 gfx::GLSurface::CreateViewGLSurface(handle.handle);
19 if (!surface.get())
20 return surface;
21 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface(
22 manager, stub, surface.get(), handle.is_transport()));
25 } // namespace content