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

Side by Side Diff: Source/testing/runner/TestPlugin.cpp

Issue 25450002: Remove unused calls on WebGraphicsContext3D (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 void TestPlugin::updateGeometry(const WebRect& frameRect, const WebRect& clipRec t, const WebVector<WebRect>& cutOutsRects, bool isVisible) 249 void TestPlugin::updateGeometry(const WebRect& frameRect, const WebRect& clipRec t, const WebVector<WebRect>& cutOutsRects, bool isVisible)
250 { 250 {
251 if (clipRect == m_rect) 251 if (clipRect == m_rect)
252 return; 252 return;
253 m_rect = clipRect; 253 m_rect = clipRect;
254 if (m_rect.isEmpty()) 254 if (m_rect.isEmpty())
255 return; 255 return;
256 256
257 m_context->reshape(m_rect.width, m_rect.height); 257 m_context->reshapeWithScaleFactor(m_rect.width, m_rect.height, 1.f);
258 m_context->viewport(0, 0, m_rect.width, m_rect.height); 258 m_context->viewport(0, 0, m_rect.width, m_rect.height);
259 259
260 m_context->bindTexture(GL_TEXTURE_2D, m_colorTexture); 260 m_context->bindTexture(GL_TEXTURE_2D, m_colorTexture);
261 m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 261 m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
262 m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 262 m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
263 m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) ; 263 m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) ;
264 m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) ; 264 m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) ;
265 m_context->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_rect.width, m_rect.height , 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); 265 m_context->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_rect.width, m_rect.height , 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
266 m_context->bindFramebuffer(GL_FRAMEBUFFER, m_framebuffer); 266 m_context->bindFramebuffer(GL_FRAMEBUFFER, m_framebuffer);
267 m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEX TURE_2D, m_colorTexture, 0); 267 m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEX TURE_2D, m_colorTexture, 0);
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 return new TestPlugin(frame, params, delegate); 571 return new TestPlugin(frame, params, delegate);
572 } 572 }
573 573
574 const WebString& TestPlugin::mimeType() 574 const WebString& TestPlugin::mimeType()
575 { 575 {
576 static const WebString kMimeType = WebString::fromUTF8("application/x-webkit -test-webplugin"); 576 static const WebString kMimeType = WebString::fromUTF8("application/x-webkit -test-webplugin");
577 return kMimeType; 577 return kMimeType;
578 } 578 }
579 579
580 } 580 }
OLDNEW
« no previous file with comments | « Source/core/platform/testing/FakeWebGraphicsContext3D.h ('k') | public/platform/WebGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698