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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h

Issue 2643343002: DrawingBuffer: Use gfx::GpuMemoryBuffer directly and set color space (Closed)
Patch Set: Fix buffer format Created 3 years, 11 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
Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
index 967a59b4298e988bbe245b951627cb4ddbff2dbc..fe1c8b329f37be4a836d9fe9f884a0815fbfba40 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
@@ -40,6 +40,7 @@
#include "platform/graphics/gpu/WebGLImageConversion.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/gfx/color_space.h"
#include "wtf/Deque.h"
#include "wtf/Noncopyable.h"
#include "wtf/RefCounted.h"
@@ -50,6 +51,10 @@ namespace cc {
class SharedBitmap;
}
+namespace gfx {
+class GpuMemoryBuffer;
+}
+
namespace gpu {
namespace gles2 {
class GLES2Interface;
@@ -301,7 +306,8 @@ class PLATFORM_EXPORT DrawingBuffer
const ColorBufferParameters&,
const IntSize&,
GLuint textureId,
- GLuint imageId);
+ GLuint imageId,
+ std::unique_ptr<gfx::GpuMemoryBuffer>);
~ColorBuffer();
// The owning DrawingBuffer. Note that DrawingBuffer is explicitly destroyed
@@ -314,6 +320,7 @@ class PLATFORM_EXPORT DrawingBuffer
const GLuint textureId = 0;
const GLuint imageId = 0;
+ std::unique_ptr<gfx::GpuMemoryBuffer> gpuMemoryBuffer;
// The mailbox used to send this buffer to the compositor.
gpu::Mailbox mailbox;
@@ -483,6 +490,10 @@ class PLATFORM_EXPORT DrawingBuffer
const bool m_wantDepth;
const bool m_wantStencil;
+ // The color space of this buffer. All buffers are assumed to be sRGB until
+ // a mechanism for creating otherwise is exposed to the web.
+ const gfx::ColorSpace m_colorSpace;
+
enum AntialiasingMode {
None,
MSAAImplicitResolve,
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/DEPS ('k') | third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698