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

Side by Side Diff: ppapi/shared_impl/ppb_graphics_3d_shared.cc

Issue 15685003: Part 2/3 (GL) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h" 5 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
9 #include "gpu/command_buffer/client/gles2_implementation.h" 9 #include "gpu/command_buffer/client/gles2_implementation.h"
10 #include "gpu/command_buffer/client/transfer_buffer.h" 10 #include "gpu/command_buffer/client/transfer_buffer.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 int32_t PPB_Graphics3D_Shared::GetError() { 44 int32_t PPB_Graphics3D_Shared::GetError() {
45 // TODO(alokp): Implement me. 45 // TODO(alokp): Implement me.
46 return PP_ERROR_FAILED; 46 return PP_ERROR_FAILED;
47 } 47 }
48 48
49 int32_t PPB_Graphics3D_Shared::ResizeBuffers(int32_t width, int32_t height) { 49 int32_t PPB_Graphics3D_Shared::ResizeBuffers(int32_t width, int32_t height) {
50 if ((width < 0) || (height < 0)) 50 if ((width < 0) || (height < 0))
51 return PP_ERROR_BADARGUMENT; 51 return PP_ERROR_BADARGUMENT;
52 52
53 ScopedNoLocking already_locked(this); 53 ScopedNoLocking already_locked(this);
54 gles2_impl()->ResizeCHROMIUM(width, height); 54 gles2_impl()->ResizeCHROMIUM(width, height, 1.f);
ccameron 2013/05/22 08:38:31 This seemed questionable to me, put pepper flash w
piman 2013/05/22 19:41:14 It's ok. Hi-DPI is handled separately in Flash. Al
55 // TODO(alokp): Check if resize succeeded and return appropriate error code. 55 // TODO(alokp): Check if resize succeeded and return appropriate error code.
56 return PP_OK; 56 return PP_OK;
57 } 57 }
58 58
59 int32_t PPB_Graphics3D_Shared::SwapBuffers( 59 int32_t PPB_Graphics3D_Shared::SwapBuffers(
60 scoped_refptr<TrackedCallback> callback) { 60 scoped_refptr<TrackedCallback> callback) {
61 ScopedNoLocking already_locked(this); 61 ScopedNoLocking already_locked(this);
62 if (HasPendingSwap()) { 62 if (HasPendingSwap()) {
63 Log(PP_LOGLEVEL_ERROR, "PPB_Graphics3D.SwapBuffers: Plugin attempted swap " 63 Log(PP_LOGLEVEL_ERROR, "PPB_Graphics3D.SwapBuffers: Plugin attempted swap "
64 "with previous swap still pending."); 64 "with previous swap still pending.");
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void PPB_Graphics3D_Shared::PushAlreadyLocked() { 155 void PPB_Graphics3D_Shared::PushAlreadyLocked() {
156 // Do nothing. This should be overridden in the plugin side. 156 // Do nothing. This should be overridden in the plugin side.
157 } 157 }
158 158
159 void PPB_Graphics3D_Shared::PopAlreadyLocked() { 159 void PPB_Graphics3D_Shared::PopAlreadyLocked() {
160 // Do nothing. This should be overridden in the plugin side. 160 // Do nothing. This should be overridden in the plugin side.
161 } 161 }
162 162
163 } // namespace ppapi 163 } // namespace ppapi
164 164
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698