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

Side by Side Diff: runtime/embedders/openglui/common/graphics_handler.cc

Issue 13042015: Various OpenGLUI changes: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "embedders/openglui/common/graphics_handler.h" 5 #include "embedders/openglui/common/graphics_handler.h"
6 #include "embedders/openglui/common/canvas_context.h" 6 #include "embedders/openglui/common/canvas_context.h"
7 #include "embedders/openglui/common/log.h" 7 #include "embedders/openglui/common/log.h"
8 8
9 extern void CheckGLError(const char *function); 9 extern void CheckGLError(const char *function);
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 void GraphicsHandler::SetViewport(int left, int top, int width, int height) { 104 void GraphicsHandler::SetViewport(int left, int top, int width, int height) {
105 width_ = width; 105 width_ = width;
106 height_ = height; 106 height_ = height;
107 glViewport(left, top, width, height); 107 glViewport(left, top, width, height);
108 CheckGLError("glViewPort"); 108 CheckGLError("glViewPort");
109 } 109 }
110 110
111 int32_t GraphicsHandler::Update() { 111 int32_t GraphicsHandler::Update() {
112 LOGI("In GraphicsHandler::Update, display_context dirty %s",
113 (display_context == NULL ? "NULL" :
114 (display_context->isDirty() ? "yes":"no")));
112 if (display_context != NULL && display_context->isDirty()) { 115 if (display_context != NULL && display_context->isDirty()) {
113 LOGI("Flushing display context\n"); 116 LOGI("Flushing display context\n");
114 display_context->Flush(); 117 display_context->Flush();
115 SwapBuffers(); 118 SwapBuffers();
116 display_context->clearDirty(); 119 display_context->clearDirty();
117 } 120 }
118 return 0; 121 return 0;
119 } 122 }
120 123
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698