flutter_flutter/engine/core/html/canvas/WebGLSharedWebGraphicsContext3D.h
Eric Seidel e0fd75b5ab Make absolute and sort all Sky headers
This caused us to lose our gn check certification. :(

Turns out gn check was just ignoring all the header
paths it didn't understand and so gn check passing
for sky wasn't meaning much.  I tried to straighten
out some of the mess in this CL, but its going to take
several more rounds of massaging before gn check
passes again.  On the bright side (almost) all of
our headers are absolute now.  Turns out my script
(attached to the bug) didn't notice ../ includes
but I'll fix that in the next patch.

R=abarth@chromium.org
BUG=435361

Review URL: https://codereview.chromium.org/746023002
2014-11-20 17:42:05 -08:00

49 lines
1.5 KiB
C++

// Copyright 2014 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.
#ifndef WebGLSharedWebGraphicsContext3D_h
#define WebGLSharedWebGraphicsContext3D_h
#include "sky/engine/wtf/Forward.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/RefPtr.h"
namespace blink {
class WebGraphicsContext3D;
class DrawingBuffer;
#if ENABLE(OILPAN)
// The attached WebGLContextObjects are finalized using the
// blink::WebGraphicsContext3D object of this object's DrawingBuffer.
// Naturally the DrawingBuffer must then be kept alive until those
// finalizers have run. With Oilpan, accomplish that by having the
// WebGLContextObjects keep a RefPtr<> to an off-heap object that
// safely handles the eventual release of the underlying
// DrawingBuffer.
class WebGLSharedWebGraphicsContext3D final : public RefCounted<WebGLSharedWebGraphicsContext3D> {
public:
static PassRefPtr<WebGLSharedWebGraphicsContext3D> create(PassRefPtr<DrawingBuffer>);
~WebGLSharedWebGraphicsContext3D();
// Disposing and updating the underlying DrawingBuffer;
// needed when handling loss and restoration of graphics contexts.
void dispose();
void update(PassRefPtr<DrawingBuffer>);
DrawingBuffer* drawingBuffer() const;
blink::WebGraphicsContext3D* webContext() const;
private:
explicit WebGLSharedWebGraphicsContext3D(PassRefPtr<DrawingBuffer>);
RefPtr<DrawingBuffer> m_buffer;
};
#endif
}
#endif // WebGLSharedWebGraphicsContext3D_h