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

Unified Diff: mojo/examples/sample_app/gles2_client_impl.h

Issue 131153007: Send size to NativeViewportClient::OnCreated instead of GLES2Client::DidCreateContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix various issues Created 6 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
« no previous file with comments | « mojo/examples/launcher/launcher.cc ('k') | mojo/examples/sample_app/gles2_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/sample_app/gles2_client_impl.h
diff --git a/mojo/examples/sample_app/gles2_client_impl.h b/mojo/examples/sample_app/gles2_client_impl.h
index d927c24a5b478e2372d981d6b76a149d393f8b43..077fdb0c38e7d77102d32a114546d7fc18548fbe 100644
--- a/mojo/examples/sample_app/gles2_client_impl.h
+++ b/mojo/examples/sample_app/gles2_client_impl.h
@@ -10,6 +10,7 @@
#include "mojo/public/gles2/gles2.h"
#include "mojom/native_viewport.h"
#include "ui/gfx/point_f.h"
+#include "ui/gfx/size.h"
namespace mojo {
namespace examples {
@@ -19,14 +20,12 @@ class GLES2ClientImpl {
explicit GLES2ClientImpl(ScopedMessagePipeHandle pipe);
virtual ~GLES2ClientImpl();
+ void SetSize(const Size& size);
void HandleInputEvent(const Event& event);
private:
- void DidCreateContext(uint32_t width, uint32_t height);
- static void DidCreateContextThunk(
- void* closure,
- uint32_t width,
- uint32_t height);
+ void DidCreateContext();
+ static void DidCreateContextThunk(void* closure);
void ContextLost();
static void ContextLostThunk(void* closure);
void DrawAnimationFrame();
@@ -35,7 +34,10 @@ class GLES2ClientImpl {
void RequestAnimationFrames();
void CancelAnimationFrames();
+ void InitializeCubeIfNeeded();
+
MojoTimeTicks last_time_;
+ gfx::Size size_;
SpinningCube cube_;
gfx::PointF capture_point_;
gfx::PointF last_drag_point_;
@@ -43,6 +45,7 @@ class GLES2ClientImpl {
bool getting_animation_frames_;
MojoGLES2Context context_;
+ bool context_created_;
MOJO_DISALLOW_COPY_AND_ASSIGN(GLES2ClientImpl);
};
« no previous file with comments | « mojo/examples/launcher/launcher.cc ('k') | mojo/examples/sample_app/gles2_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698