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

Side by Side Diff: gpu/command_buffer/client/context_support.h

Issue 2302393002: Support swap damage rect using eglSwapBuffersWithDamageKHR (Closed)
Patch Set: Update GLSurfaceAdapter Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 18 matching lines...) Expand all
29 // passed the glEndQueryEXT() point. 29 // passed the glEndQueryEXT() point.
30 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; 30 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0;
31 31
32 // Indicates whether the context should aggressively free allocated resources. 32 // Indicates whether the context should aggressively free allocated resources.
33 // If set to true, the context will purge all temporary resources when 33 // If set to true, the context will purge all temporary resources when
34 // flushed. 34 // flushed.
35 virtual void SetAggressivelyFreeResources( 35 virtual void SetAggressivelyFreeResources(
36 bool aggressively_free_resources) = 0; 36 bool aggressively_free_resources) = 0;
37 37
38 virtual void Swap() = 0; 38 virtual void Swap() = 0;
39 virtual void SwapWithDamage(const gfx::Rect& damage) = 0;
39 virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) = 0; 40 virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) = 0;
40 virtual void CommitOverlayPlanes() = 0; 41 virtual void CommitOverlayPlanes() = 0;
41 42
42 // Schedule a texture to be presented as an overlay synchronously with the 43 // Schedule a texture to be presented as an overlay synchronously with the
43 // primary surface during the next buffer swap or CommitOverlayPlanes. 44 // primary surface during the next buffer swap or CommitOverlayPlanes.
44 // This method is not stateful and needs to be re-scheduled every frame. 45 // This method is not stateful and needs to be re-scheduled every frame.
45 virtual void ScheduleOverlayPlane(int plane_z_order, 46 virtual void ScheduleOverlayPlane(int plane_z_order,
46 gfx::OverlayTransform plane_transform, 47 gfx::OverlayTransform plane_transform,
47 unsigned overlay_texture_id, 48 unsigned overlay_texture_id,
48 const gfx::Rect& display_bounds, 49 const gfx::Rect& display_bounds,
49 const gfx::RectF& uv_rect) = 0; 50 const gfx::RectF& uv_rect) = 0;
50 51
51 // Returns an ID that can be used to globally identify the share group that 52 // Returns an ID that can be used to globally identify the share group that
52 // this context's resources belong to. 53 // this context's resources belong to.
53 virtual uint64_t ShareGroupTracingGUID() const = 0; 54 virtual uint64_t ShareGroupTracingGUID() const = 0;
54 55
55 // Sets a callback to be run when an error occurs. 56 // Sets a callback to be run when an error occurs.
56 virtual void SetErrorMessageCallback( 57 virtual void SetErrorMessageCallback(
57 const base::Callback<void(const char*, int32_t)>& callback) = 0; 58 const base::Callback<void(const char*, int32_t)>& callback) = 0;
58 59
59 protected: 60 protected:
60 ContextSupport() {} 61 ContextSupport() {}
61 virtual ~ContextSupport() {} 62 virtual ~ContextSupport() {}
62 }; 63 };
63 64
64 } 65 }
65 66
66 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 67 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698