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

Unified Diff: ui/gl/gl_surface_stub.h

Issue 2735853002: Offset scissor and viewport when using SetDrawRectangle on surface. (Closed)
Patch Set: remove flag Created 3 years, 9 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 | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_stub.h
diff --git a/ui/gl/gl_surface_stub.h b/ui/gl/gl_surface_stub.h
index 860f989667c047e93ec188a1a04b1fef406ae68b..87f5565582cb86c1e70620282fb365c93a07c6ee 100644
--- a/ui/gl/gl_surface_stub.h
+++ b/ui/gl/gl_surface_stub.h
@@ -16,6 +16,10 @@ class GL_EXPORT GLSurfaceStub : public GLSurface {
void SetSize(const gfx::Size& size) { size_ = size; }
void set_buffers_flipped(bool flipped) { buffers_flipped_ = flipped; }
+ void set_supports_draw_rectangle(bool support) {
+ supports_draw_rectangle_ = support;
+ }
+
// Implement GLSurface.
void Destroy() override;
bool Resize(const gfx::Size& size,
@@ -27,6 +31,8 @@ class GL_EXPORT GLSurfaceStub : public GLSurface {
void* GetHandle() override;
bool BuffersFlipped() const override;
GLSurfaceFormat GetFormat() override;
+ bool SupportsSetDrawRectangle() const override;
+ gfx::Vector2d GetDrawOffset() const override;
protected:
~GLSurfaceStub() override;
@@ -34,6 +40,7 @@ class GL_EXPORT GLSurfaceStub : public GLSurface {
private:
gfx::Size size_;
bool buffers_flipped_ = false;
+ bool supports_draw_rectangle_ = false;
};
} // namespace gl
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698